关于MindMeister API的认证,分为三种:
- API key
- OAuth 2.0 应用
- 个人访问 token
我想使用第三个,它解释了下一个:
Personal access tokens
Personal access tokens enable direct access to your MindMeister account via the API without the need of an OAuth 2.0 App or and an API key.
我创建了一个并用它来执行 API 调用,但收到错误 99:
{"rsp":{"stat":"fail","err":{"code":"99","msg":"The method requires user authentication but the user was not logged in, or the authenticated method call did not have the required permissions."}}}
我尝试测试此方法“mm.auth.checkToken”
这是文档 MindMeister API Developers ,但没有任何与“个人访问 token ”相关的内容。
我的请求 URL 如下所示:
https://www.mindmeister.com/services/rest?api_key=<api_key_code>&auth_token=<personal_token>&method=mm.auth.checkToken&response_format=json&api_sig=<md5 hash of the sign>
我不知道如何使用这个API功能,所以我想知道这个,请帮助我。
最佳答案
不幸的是,此功能尚未包含在 MindMeister API 文档中。
使用以下 URL 通过个人访问 token 访问 api:
https://www.mindmeister.com/services/rest/oauth2?access_token=<access_token>&method=<method>
如果是 OAuth 2.0,您无需再签署请求,也无需发送 api key 。只需发送有效的访问 token 、方法名称及其所需参数即可。
关于api - 我该如何使用MindMeister API的 "Personal access tokens"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31659564/