Start job activity --error

Oh ok, thanq.

1 Like

Hey @Lahiru.Fernando!

I think @UiP_Mc can help.
He already had an experience on this one :slight_smile:

1 Like

Regarding the ApI and all @Jan_Brian_Despi!?

Inviting few more guys here in case they have any exp in API…

@KarthikByggari @sandeep13 @pavanh003

2 Likes

Thanks to invite @Lahiru.Fernando but I am not so much experience in API also

2 Likes

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:
image

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:

  1. For the value of authorization it should be “Bearer (access_token)”
  2. You can get the exact value of your X-UIPATH-TenantName from this API:
    Getting Service Instance Logical Name

Sample Request Body:

  1. So basically, authenticate and get the access_token generated from Generating Access Token and ID Token using the Refresh Token
  2. Then use the access_token for Start Job API

Feel free to ask more questions if it’s not clear.

Regards,
Mc

4 Likes

Hey thanks @Lahiru.Fernando

1 Like

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.

1 Like

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.

2 Likes

Yeah but after logging to, I did not get the auth code! After logging , it gets opened and thats it.
Will see this screen,

1 Like

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:


image

It will generate your own unique Code Challenge.
This should work afterwards.

Regards,
Mc

1 Like

Hey, I have given the code challenge code.

1 Like

Hey I got it now. The auth code.

1 Like

This is the response I got @UiP_Mc, can you let me know, where is the error!

1 Like

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:
image

Regards,
Mc

1 Like

Hey @UiP_Mc, thanq will do them.

1 Like

Got this response now.

1 Like

Try generating a new code verifier. The one you’re using right now might’ve expired.

1 Like

Yeah, I did the new code one too. Got the same error.

1 Like

Try to do everything again from step 1, there’s gotta be some wrong code. I went through it and it worked fine