Orch token

Hello
im trying to get token https://uipathidentity-dev.azurewebsites.net/identity/connect/token
has the following in body

grant_type:Client_credentials
client_id:1ca6bf5e-17dc---------
client_secret:o8---------
scope:OR.Queues.Write

and in the header i have

X-UiPath-TenantName:DefaultTenant
Content-Type:application/json

i always get 400 error not sure what im missing here any idea

BR/Hazem

@Hazem_Saleh Set header Content-Type to:
application/x-www-form-urlencoded

Hi @Hazem_Saleh

Are you in community version or enterprise one?

Could you please check your endpoint url? It doesn’t seem right.

For community, try below

https://cloud.uipath.com/identity_/connect/token

For enterprise one, try below url

UiPath org name here/identity_/connect/token

Also, check the scopes you have added to your external application registration. In my view, it should be 2 scopes at least.

Or.queues.write
Or.queues.admin

Hi it is enterprise version standalone
im looking at
Orchestrator API guide

now i added two scopes but still the same issue !
thanks

i did that as well but no luck

Hi @Hazem_Saleh

If it’s enterprise standalone, then follow the steps in below post.

@Hazem_Saleh

Bad request says that the body is wrong mostly

And are you using body exactly as above? If so you need to format it first

Cheers

Hi,
yes its 400,
do we send it in the header or body?
yes i did format it as Jason!

thanks

@Hazem_Saleh

it should be in the body

cheers

thanks

{
"grant_type":"Client_credentials",
"client_id":"----------",
"client_secret":"--------",
"scope":"OR.Queues.Write"
}

now i have it in body but same issue

@Hazem_Saleh

is the body type proper?

it should be x-www-form-urlencoded..are you using postman?

this si the body type

cheers

thanks found the issue now im using machine scope only and its working
if i use user there issue with URI

thanks for your time

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.