Request Access Token

To perform operations with the MOOST API, it is essential to obtain a new access token from the Auth API. This token is required for authenticating and authorizing your requests. The steps to lease a new access token are as follows:

  1. Request a New Token: Send a request to the https://api.moost.io/auth/token/v1 endpoint with the provide client id and client secret to obtain a new access token. This endpoint will issue a token that is valid for 86400 seconds (24 hours).

  2. Use the Token: Include the access token in the Authorization header of your API requests to authenticate them. This token grants access to the API's functionalities as documented.

  3. Token Expiration: Be aware that the access token will expire after 86400 seconds. It is crucial to monitor the token's validity and request a new one before it expires to maintain uninterrupted access to the API.

  4. Refresh the Token: Once the token expires, repeat the process by sending a request to the /auth/token/v1 endpoint to lease a new access token. Ensure this is done promptly to continue using the API services without any interruptions.

By following these steps, you can efficiently manage the access tokens required for seamless interaction with the API.

Auth Token API

Receive a new access token

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
clientIdstringRequiredPattern: ^[a-zA-Z0-9]{1,100}$
clientSecretstringRequiredPattern: ^[a-zA-Z0-9_-]{1,100}$
Responses
200

Success. Valid access token obtained.

application/json
get
/auth/token/v1

Example

API Call with CURL

Sample response

You may store the access token in another variable, if you plan to call some MOOST API from the shell:

Last updated