Unable to authenticating to my cloud platform based Orchestrator Tenant

I performed a POST request to “https://id-platform.uipath.com/oauth/token” by python3 script

here is my code

X_UIPATH_TenantName = "airiDefaultvlbq2462111"
client_id = "8DEv1AMNXczW3y4U15LL3jYf62jK93n53"
user_key = "bK65y5qxj5_sS8s3_uznu6d361yEjOFjBQMkeQQGkATWid"

uri = "https://id-platform.uipath.com/oauth/token"

header = {"Content-Type": "application/json", "X-UIPATH-TenantName": X_UIPATH_TenantName}

payload = {
"grant_type": "refresh_token",
"client_id": client_id,
"refresh_token": user_key
}

response = requests.post(uri, headers = header, data=json.dumps(payload))

Traceback (most recent call last):
File “/home/choi/rpa-renewal/renewal-env/lib/python3.6/site-packages/urllib3/connection.py”, line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File “/home/choi/rpa-renewal/renewal-env/lib/python3.6/site-packages/urllib3/util/connection.py”, line 61, in create_connectionemphasized text
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File “/usr/lib/python3.6/socket.py”, line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

but host name not found error occured.
how i can solve this issue?

p.s) for some security issues. my access information is fake.

Are you sure, that you are using the right URL?

yes, i copied from reference
https://docs.uipath.com/orchestrator/reference#consuming-cloud-api

Are you behind a firewall? You might have to provide proxy authentication in the python call.

It’s very odd.
In the previous version, there was no problem authenticating oc with the above method.

I wonder if there is something wrong with the patch.

why I need to provide proxy auth in the above call?

I am facing the issue as well is #uipath #Orchestrator API down ??


The official uipath documentation maintained here is wrong .
https://docs.uipath.com/orchestrator/reference#consuming-cloud-api

Instead of https://id-platform.uipath.com/oauth/token
try https://account.uipath.com/oauth/token

if i use the following url i am able to get the access token

https://account.uipath.com/oauth/token

3 Likes

Tnk very much!!
And the updated reference is missing a way to refresh access token. How can I refresh access token?

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