3

当我尝试使用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)

...我收到以下结果。我在产品和沙盒中得到相同的结果

{
    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),则此方法有效,我会收到完整的会话信息。

4

1 回答 1

3

如果您收到空白响应,则说明您没有 API 密钥可获取。您可以通过打开设置 > 系统 > 客户信息或通过 API 在 UI 中生成

/attask/api/v5.0/user?action=generateApiKey&username=yyyyy@xxxxx&password=xxxxxxxx&method=put
于 2016-11-03T21:31:51.940 回答