Search code examples
apirestapi-keymindmappingapi-authorization

How should I use "Personal access tokens" of MindMeister API?


About the authentication of MindMeister API, there are three types:

  1. API Keys
  2. OAuth 2.0 Apps
  3. Personal Access tokens

I want to use the third one, it explains the next:

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.

I created one and I use it to perform my API calls, but I get error 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."}}}

I tried test this method 'mm.auth.checkToken'

Here is the documentation MindMeister API Developers, but there is nothing related to the "Personal Access Tokens".

My request URL looks like this:

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>

I don't know how to use this API feature, so I want to know this, please help me.


Solution

  • Unfortunately this feature isn't yet included in the MindMeister API documentation.

    Use the following url for accessing the api with personal access tokens:

    https://www.mindmeister.com/services/rest/oauth2?access_token=<access_token>&method=<method>
    

    In case of OAuth 2.0 you don't need to sign the request anymore and you don't have to send an api key. Just send a valid access token, the method name and its required parameters.