3

When I attempt to derive an APIkey from a user account in Workfront using the methods detailed in https://developers.workfront.com/api-docs/#API_key I only get a blank response. Whilst most users in this domain auth using SAML the user in question has been set up as a API account and SAML is disabled.

The URL used is:

/attask/api-internal/user?action=getApiKey&username=yyyyy@xxxxx&password=xxxxxxxx&method=put (xxx and yyy masking actual text)

... and I receive the following result. I get the same result in both prod and sandbox

{
    data: {
    result: ""
    }
}

If I use an invalid user/password pair I receive the following result:

{
    error: {
        class: "com.attask.common.AuthenticationException",
        message: "That username/password combination wasn't quite right. 
                 Make sure your caps lock isn't on and try again."
   }
}

If use the user/password method to auth (https://developers.workfront.com/api-docs/#Authentication) this works and I receive the full session information.

Liam
  • 27,717
  • 28
  • 128
  • 190
cesther
  • 51
  • 4

1 Answers1

3

If you are getting a blank response then you do not have a API key to get. You can either generate on in the UI by opening setup > system > customer info or through the API

/attask/api/v5.0/user?action=generateApiKey&username=yyyyy@xxxxx&password=xxxxxxxx&method=put
michael johnson
  • 757
  • 1
  • 4
  • 10
  • 1
    ..how come this isn't mentioned anywhere on the WorkFront API doc, which only states that after you clear the key just request it again but that would only give a empty result. This action is only mentioned in the obscure page of Event Subscription API when I did a search on google. – TurtleTread Jul 07 '17 at 16:47