Facing invalid text/html error while using getjson
Hi all,
I am trying to generate a bearer token from azure on Thingworx (9.3.2) using getJSON function, but I am facing "Message :: Invalid Content-Type: text/html - See Script Error Log for more details" this issue. When I tried it from the postman, it was working fine! I am using the below URL and headers in my code
var url = "https://login.microsoftonline.com/XXXXXXXXXXXxX/oauth2/token";
var headers = {
"Accept": "text/html",
"Content-Type": "text/html",
"grant_type": "client_credentials",
"client_id": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
"client_secret" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"resource" : "https://servicebus.azure.net"
};
Thank you!

