workfront:尝试创建API密钥时的空白响应

时间:2016-06-13 04:37:50

标签: workfront-api

当我尝试使用https://developers.workfront.com/api-docs/#API_key中详述的方法从Workfront中的用户帐户派生APIkey时,我只得到一个空白的回复。虽然此域中的大多数用户使用SAML进行身份验证,但相关用户已设置为API帐户且SAML已停用。

使用的网址是:

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

...我收到以下结果。我在prod和sandbox中得到了相同的结果

{
    data: {
    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."
   }
}

如果使用用户/密码方法进行身份验证(https://developers.workfront.com/api-docs/#Authentication),则此方法有效,并且我会收到完整的会话信息。

1 个答案:

答案 0 :(得分:2)

如果您收到空白回复,则表示您没有API密钥。您可以通过打开设置>在UI中生成... “系统”>客户信息或通过API

/attask/api/v5.0/user?action=generateApiKey&username=yyyyy@xxxxx&password=xxxxxxxx&method=put