Oh ok, thanq.
Inviting few more guys here in case they have any exp in API…
Hi @sushmithaelluru,
Before starting the job, you need to have an access token (bearer token) from:
Generating Access Token and ID Token Using the Refresh Token
You only need to generate your refresh_token once and you would be able to keep using that same token everytime you authenticate (don’t need to go through the whole step of using the .js file everytime to authenticate, just use the API above)
This is how the header should look like:
And for the request body:
After authenticating you will receive a response containing the access_token, you will then have to use this for the Start Job API below:
Headers:
Note:
- For the value of authorization it should be “Bearer (access_token)”
- You can get the exact value of your X-UIPATH-TenantName from this API:
Getting Service Instance Logical Name
Sample Request Body:
- So basically, authenticate and get the access_token generated from Generating Access Token and ID Token using the Refresh Token
- Then use the access_token for Start Job API
Feel free to ask more questions if it’s not clear.
Regards,
Mc
Hey hi @UiP_Mc, at the step 7 in the Get Authorization Code where I need to get the auth code as they shown below,
But am not able to see authorization code ,
Can you please let me know, how to proceed further.
Thanks.
Hi, you need to login first. After doing so you should see ‘OK’ in your browser. Your URL will then be changed with the code you will be needing on the following API.
Yeah but after logging to, I did not get the auth code! After logging , it gets opened and thats it.
Will see this screen,
Hi @sushmithaelluru,
I believe it’s because you didn’t replace the [Code Challenge] part.
You can get your code challenge after going through this step:
It will generate your own unique Code Challenge.
This should work afterwards.
Regards,
Mc
Hey, I have given the code challenge code.
Hey I got it now. The auth code.
Hi @sushmithaelluru, kindly remove the brackets “[code]” in your code and code_verifier, it should just be “code”
Also, click the dropdown beside Text, then choose JSON:
Regards,
Mc
Try generating a new code verifier. The one you’re using right now might’ve expired.
Yeah, I did the new code one too. Got the same error.
Try to do everything again from step 1, there’s gotta be some wrong code. I went through it and it worked fine