Authentication
All our API endpoints are protected and require authentication. If you already registered your application, you can find it in Monta Hub.
Access Token
To obtain your access token - needed for all subsequent requests - you have to call our /auth/token endpoint and provide your clientId and clientSecret.
If your request was successful, you'll receive a response like this:
Code
For subsequent requests, you have to use the accessToken for authentication. Pass it to the Authorization header as Bearer token:
Example: Authorization: Bearer 4596d494-5f6c-4f87-aed5-db68240a58dd
Make use of Refresh Token flow!
As you can see the accessToken will expire within 1 hour. To protect your clientId and clientSecret you should make use of the refreshToken and Refresh Token flow to obtain a new one.
Refresh Token flow
To refresh your access token you have to call our /auth/refresh endpoint and provide your refreshToken.
If your request was successful, you'll receive a new set of access and refresh tokens:
Code
Information about current application
You can use the /auth/me endpoint to receive information about the scope etc for the given application. A sample response looks like this:
Code
This credential has access to all resources from the User with id 1.