Workfront API Authentication Error "You are not currently logged in." while trying to access via Postman | Community
Skip to main content
October 18, 2024
Question

Workfront API Authentication Error "You are not currently logged in." while trying to access via Postman

  • October 18, 2024
  • 2 replies
  • 2457 views

Hello all,
I'm trying to use Workfront APIs but it keeps throwing the following authentication error. "You are not currently logged in."
Note: I am using it in a sandbox environment with a system admin user. API version 15.0
From what I have understood from the documentation, there are 2 ways for authentication.
1. SessionId - I tried using the login API to obtain a sessionId. I used the below mentioned URL for a POST call.
https://mysandboxdomain.my.workfront.com/attask/api/v15.0/login?username=useremail&password=userpassword
Unfortunately, it keeps giving me the unauthorized error. I even tried using url encoding for my credentials as they have some special characters but that doesn't seem to work either 
2. API Key - I tried using the project API with an API key that I generated from the sandbox instance but that didn't work either. Below is the URL I used for a GET call.
https://mysandboxdomain.my.workfront.com/attask/api/v15.0/project/projectSpecificURI?apiKey=apikeyGeneratedFromTheSandbox
I tried by using a newly generated API key but none of that seems to work.
Note: The project API works perfectly from the browser when I'm logged in to the instance

2 replies

RandyRoberts
Community Advisor
Community Advisor
October 18, 2024

Hi, Here's how mine is set up:

In Environments I have Preview and Production with all the parameters in the screenshot

In collections, I have some hierarchical folders set up with some different types of API calls

I have 3 top tier folders where the Authorisation is defined as "apikey"

I have subfolders where the Authorization is set to "Inherit from Parent"

Each level of the hierarchy will inherit its auth from its parent until it gets to the top tier where it will use the "apikey"

in each API call I use the global {{base_url}} and {{apikey}} to pull from the environment I'm in at the moment. This way you can switch from Preview to Sandbox to Production without changing any of your API calls.

See screenshots:

 

TIP: if this solved your problem, I invite you to consider marking it as a Correct Answer to help others who might also find it of use.
If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/mysocalledideas

 

AnirudhKaAuthor
October 21, 2024

Hi @randyroberts, thanks for replying. I'm working on this workfront API collection that I found online which has a very similar setup to that of yours. I have attached a few screenshots, can you please help me figure out what I'm missing
Top most folder:

Parent folder: 

API request:

 

skyehansen
Community Advisor and Adobe Champion
October 18, 2024

I can only go off what you're showing me... so to break it down:

 

1) I use option 2.

2) https://mysandboxdomain.my.workfront.com -- this isn't the right address for a sandbox. The word "my" would never show up there.

3) /project/projectSpecificURI? -- not sure what this is exactly, but I would go with /proj/search?ID=67847382648238427 (assuming you're searching for a project using their GUID?)

AnirudhKaAuthor
October 21, 2024

Hello, thanks for replying @skyehansen , https://mysandboxdomain.my.workfront.com is just a placeholder that I have used in this post. I'm pretty sure that I'm using the correct domain name as I copied it from the "setup > system > customer info" as shown in the documentation. 
About the projects API, I'm using the project GET API and not the search API. Here is a reference to it. Also, "projectSpecificURI" is just a placeholder term, sorry about the placeholder confusion. Anything else you think I'm missing?

 

skyehansen
Community Advisor and Adobe Champion
October 21, 2024

I'm looking at your screenshots you sent to Randy. In your screenshots for the API request, you're showing no environment selected (upper right corner)? You also haven't provided any screenshots showing how your environment was set up -- did you create one (per his first screenshot)? If you did, can you show it like he did, with the info blanked out?