Step 1: Get your credentials

Learn the steps to set up your Partner account and authenticate API calls.

Overview

The very initial steps of integrating with Monite include creating a partner account within Monite’s Partner Portal and getting your API credentials. These credentials allow you to generate the access tokens required to make API calls to the Monite platform.

1. Register a partner account

First, you need to register your partner account on the Monite Partner Portal.

After signing up, you must confirm your email address by clicking the link in the registration email.

Welcome email
Welcome email

2. Get API credentials

To generate the credentials required to access the Monite API:

  1. In the Partner Portal, click API Credentials.

    API credentials
    API credentials
  2. On the page that opens, click Add credential.

  3. Copy the generated client ID and secret as you will not be able to see them again.

    Client ID and secret
    ID and secret

Keep your client ID and secret secure, because they provide access to all your data and your customers’ data stored in Monite.

You can create multiple sets of API credentials for use in different contexts. For example, one set for a client app and another one for a CI/CD environment.

3. Generate a partner access token

The client ID and secret need to be exchanged for an access token, which is then used to authenticate your API calls. To do this, call POST /auth/token with the following request body:

1{
2 "grant_type": "client_credentials",
3 "client_id": "YOUR_CLIENT_ID",
4 "client_secret": "YOUR_CLIENT_SECRET"
5}

For example:

1curl -X POST 'https://api.sandbox.monite.com/v1/auth/token' \
2 -H 'X-Monite-Version: 2023-09-01' \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "grant_type": "client_credentials",
6 "client_id": "28c10852-7e78-43cf-abfb-efeed7734963",
7 "client_secret": "615b3cfa-646b-41d9-b768-521f79315ac5"
8 }'

The successful response contains the token and its validity time (in seconds):

1{
2 "access_token": "eyJ0eXAiOiJKV1QiLCJhb...",
3 "token_type": "Bearer",
4 "expires_in": 1800
5}

Now you can send this token in the Authorization header in subsequent API calls to the Monite platform:

Authorization: Bearer YOUR_TOKEN

Besides generating a partner-level access token with highest privileges for all operations, you might also consider using entity-user tokens with more granular roles and permissions. To learn more about the Role-Based Access Control system and other main security considerations, refer to Authentication.

Next steps

Congrats! Now you are all set to continue integrating with the Monite platform. Please proceed with the following step to set up your backend: