Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!

How to set up a redirect URL in workfront

Avatar

Level 1

Hi Team,

 

I am trying to create an OAuth2 application in Workfront for my client application to access it . One of the steps required for this is the redirect URL .

Could you please help me how to set up this redirect URL in Workfront and use it  ?

11 Replies

Avatar

Level 10

Hi,

 

You do not need to setup the redirect URL in Workfront, but within your application, which should get access to Workfront via OAuth.

 

So, the question is, what you want to achieve and on which basis your application is working.

 

Regards

Lars

Avatar

Level 1

Hi Lars,

 

Thanks for your response. Yes, I want to set up the redirect URL in my OAuth2 application.

We are trying to integrate Workfront with an external system for which we need to first authorize and authenticate ourselves with Workfront via OAuth2 application.

So when I am creating this OAuth2 application. , am asked for setting up redirect url .

 

The authorization url looks like this : 

https://<URL of your organization's domain>/integrations/oauth2/authorize?client_id=<Your ClientID>&redirect_uri=<Your redirect URL>&response_type=code

 

I am providing below details to the above URL: 

 

https://salix.sb02.workfront.com//integrations/oauth2/authorize?client_id=db8c6c604fa26aea1f761e575c....

 

I have provided replaced the actual values here with some dummy values.

 

So when I am hitting this endpoint . I get error from postman:

 

NehaDh1_0-1720450093561.png

 

Could you pls help me to find out what am missing here ?

Avatar

Level 10

Hi,

 

If you’re testing from Postman’s web application, add the following redirect URI: https://oauth.pstmn.io/v1/browser-callback. If you’re testing from the Postman desktop application, add this URI: https://oauth.pstmn.io/v1/callback. If you switch between the web and desktop application during your development workflow, you should add both URIs.

 

If you will use another application later, you will need to setup a redirect url on your own. 

For example, I access the Workfront API via Python and have set up a local web server for OAuth authentication, which is briefly activated for the redirect.

 

 

Regards

Lars

Avatar

Level 1

Hi @lgaertner ,

 

I tried redirect url for postman desktop application , but i am getting the same error as attached in above snapshot.

 

Thanks

Avatar

Level 10

Can you please send a screenshot of your postman setup?

Did you add the redirect URLs to the OAuth app setup in Workfront?

 

 

Regards

Lars

Avatar

Level 1

Hi Lars,

 

I have set up redirect URLs for both, postman web and desktop app in my Workfront OAuth application . Attaching the postman screenshot for your reference .

 

NehaDh1_1-1720453724647.png

 

 

 

But I still get the response that I need to enable JavaScript 

Avatar

Level 1

I am also attaching the screenshots for my OAuth2 application in workfront below : 

 

NehaDh1_0-1720453829759.png

 

 

NehaDh1_1-1720453873895.png

 

Avatar

Level 10

Hi,

 

I am quite sure, that this will not work. You are sending a GET request to the Authorization URI.

 

I would follow this to setup OAuth in Postman. You need to set everything up under the Authorization tab of your collection in Postman.

 

Regards

Lars

Avatar

Level 1

Hi @lgaertner ,

 

As per your suggestion, I set up everything under Authorization tab in postman and now I am able to get access token and refresh token successfully.

But it asks me to sign in every time (whenever I need access token) into Workfront and ask for access allow to my OAuth2 application and then provide the authentication code to postman (using redirect URL).

Do I need authentication code every single time for getting access token and refresh token or its an one time activity just to authenticate my application.?

 

(I am doing postman POC right now just to establish the connectivity with Workfront but later now I am going to create an application which will connect with Workfront and get the data so I need to confirm if I will have to create a redirect URL in my application also for authentication code or I can just use postman redirect URL if its a one time activity to get the authenticate code and then use access token/ refresh token going forward )

 

 

Attaching the screenshots here , 

NehaDh1_0-1720527312782.png

 

After signing up ,

 

NehaDh1_1-1720527466338.png

 

 

Thanks,

Neha 

 

 

Avatar

Level 1

Hi @NehaDh1 , can you share a screenshot of your setup in postman. I'm also started exploring WF API and encountering the same issue you had.

Please blur the client ID, secrets and other confidential info. Appreciate the help that you can extend.

Avatar

Level 10

Hello,

 

Did you activate the option Auto-refresh access token in Postman's authorization tab?

 

This should help...

 

Regards

Lars