Hi all,
We have a specific use case where we want to leverage Workfront-related APIs, such as "attask/api/v15.0/user/search" and "attask/api/v15.0/user?id={user_id}." To set up this functionality, we followed the guidance provided in this link [https://experienceleague.adobe.com/docs/workfront/using/adobe-workfront-api/workfront-api.html] .
The process involved several steps. First, we created an Integration App for OAuth from our console and generated a pair of public and private keys for asymmetric encryption. Subsequently, we used the Customer ID and User ID from the app to create a JWT token, which was then signed with the private key. Once we had the JWT token, we made use of this API endpoint: https://yourdomain.my.workfront.com/integrations/oauth2/api/v1/jwt/exchange to obtain an access token, which we successfully acquired.
However, when we attempted to access the aforementioned APIs using the obtained access token and included it as a Bearer token in the authorization header, we encountered authentication issues. The error message we received was:
{
"error": {
"class": "com.attask.common.AuthenticationException",
"message": "Authentication Exception: Authentication Exception: {0}"
}
}
I would greatly appreciate any assistance in resolving this matter. Please guide me on how to correctly use the access token for authentication and API access. If I have overlooked something or made an error, your guidance would be invaluable.
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Sorry. I made a mistake recently and double checked my code.
Instead of
'Authorization': 'sessionID ' + <bearer token>,
You need to use the following header:
'sessionID': <bearer token>
So you don't need the keyword Authorization here.
I tried my API call with the wrong header and do get exactly the same error message as you. Using my corrected version it is working.
Regards
Lars
Hello rjwaji,
Although I have no experiences with the JWT token, as I am using OAuth Authorization Code Flow, can you please check, if you used the keyword sessionID in your Authorization header in front of your token? I made the experience, that it does work using
'Authorization': 'sessionID ' + <bearer token>,
but not the common way:
'Authorization': 'Bearer ' + <bearer token>,
Regards
Lars
Hi,
I tried, getting the same error. what authentication flow you using?
Views
Replies
Total Likes
Hi,
Sorry. I made a mistake recently and double checked my code.
Instead of
'Authorization': 'sessionID ' + <bearer token>,
You need to use the following header:
'sessionID': <bearer token>
So you don't need the keyword Authorization here.
I tried my API call with the wrong header and do get exactly the same error message as you. Using my corrected version it is working.
Regards
Lars
Thanks @lgaertner
Views
Replies
Total Likes
Views
Likes
Replies