本文介绍了Active Collab v5 问题令牌 API 调用返回“无效密码"即使密码有效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在尝试通过此调用获取 API 令牌:

I am trying to obtain an API Token via this call:

curl -H "Content-Type: application/json" -X POST -d '{"username": "MY_EMAIL","password": "MY_PWD","client_name": "XXX","client_vendor": "XXX"}' https://app.activecollab.com/MY_ID/api/v1/issue-token

但即使密码正确,我也收到此回复:

But I am receiving this response even though the password is correct:

{
    "type":"ApiSubscriptionError",
    "message":"Invalid password",
    "code":3
}

我正在按照 https://labs.activecollab 上的说明进行操作.com/nightly-activecollab-api/v1/authentication.html

有人可以使用 Active Collab v5 API 吗?如果是这样,你能帮忙找出问题吗?

Is anyone able to use the Active Collab v5 API OK? If so, can you help spot the trouble?

推荐答案

认证分两步完成.第一个是向主要身份验证服务(https://activecollab.com)进行身份验证:

Authentication is done in two steps. First one is to authenticate to main authentication service (https://activecollab.com):

curl -XPOST -d '[email protected]&password=******' https://activecollab.com/api/v1/external/login

此调用将返回经过身份验证的用户有权访问的帐户列表以及用户详细信息:

This call will return a list of accounts that authenticated user has access to, as well as user details:

{
    "is_ok": true,
    "accounts": [
        {
            "class": "FeatherApplicationInstance",
            "display_name": "Company Name (ID: #ACCOUNT_ID#)",
            "name": 1,
            "url": "https://app.activecollab.com/#ACCOUNT_ID#"
        }
    ],
    "user": {
        "avatar_url": "https://activecollab.com/avatars/user_#USER_ID#.png",
        "first_name": "John",
        "last_name": "Doe",
        "intent": "long string"
    }
}

在用户属性中,有 intent 属性.它用于再次验证特定的 Active Collab 5 帐户,如下所示:

Among user properties there's intent property. It is used to authenticate agains a particular Active Collab 5 accounts, like this:

curl -XPOST -d 'intent=LONG-INTENT-STRING-HERE&client_name=AppName&client_vendor=AppVendor' https://app.activecollab.com/#ACCOUNT_ID#/api/v1/issue-token-intent

客户供应商和客户名称是您的组织名称和应用名称.此调用将返回一个令牌,您可以使用该令牌在该帐户中进行进一步的 API 调用:

Client vendor and client name are names of your organisation, and name of your app. This call will return a token that you can use to make further API calls in that account:

curl -H "X-Angie-AuthApiToken: TOKEN-HERE" https://app.activecollab.com/#ACCOUNT_ID#/api/v1/projects

这篇关于Active Collab v5 问题令牌 API 调用返回“无效密码"即使密码有效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 16:12