Orchestrator 2020.10 on prem API Error 415 unsupported media type

Good afternoon community

I am new to using APIs and REST with out some sort of plug in to do the hard work for me!

I am currently using Visual Studio with REST client installed (0.18.4). I am trying to get over the first hurdle of authenticating, I have following the Documentation but I am getting an 415 unsupported media type error. can someone point out what I have got wrong

this is the code I am using (sensitive details replaced with [**])

POST https://[* *]/api/account/authenticate

Content-Type: application/json

{
“tenancyName” : “Default”,
“usernameOrEmailAddress” : “[* ]",
“password” : "[
*]”
}

Hi,

415 error mostly caused due to the content type which is not supporting by the server.

As per your comment i could not see any issue for your API request. Method and content everything correct and also the content type you are passing parameter that is also correct.

in my opinion you should check one option in your http request activity. please enable the Accept format to JSON and try once.

Hi Sorry I am not using Studio at this point Just MS Visual Studio, is there something I am missing when using MS Visual Studio?

ok got it. in that case please check the content type - application/json parameter passing correctly. i am very sure this is due to the content type we are passing to orch to get the results.

I don’t know why but when i send this request I am getting a 200 ok return

Gethttps://[*]/Account/Authenticate

Content-Type: application/json

{
“tenancyName” : “Default”,
“usernameOrEmailAddress” : “[]",
“password” : "[
]”
}

guess next step is to understand why and then how to run sevral requests one after another :slight_smile:

yeah first message itself i could see there are no errors or issues in your rest call.

Not sure why we got the exception earlier.

thanks for the post.

@LittliBearbot

Check below for your reference

Hope this may help you

Thanks