Skip to content
  • SDKs and APIs
  • Kinde Management API

Kinde Management API Quickstart Guide

The Kinde Management API lets you do everything you can do with the Kinde UI. It is useful for programmatically managing your Kinde account and resources, such as in CI/CD pipelines.

To call the Kinde Management API, you need a Machine to Machine (M2M) access token authorized to use the Management API.

This guide shows you how to set up and authorize a new M2M application with the appropriate scopes. Watch this YouTube video for a quick demo:

1. Create an application for API access

Link to this section
  1. Go to your Kinde dashboard and select Add application.

  2. Give the application a name (e.g., “API Automation”), and select Machine to machine (M2M) as the application type.

    kinde create m2m application

  3. Select Save.

  4. Go to the APIs page.

  5. Select the three dots next to the Kinde Management API, then choose Authorize application.

  6. Select the three dots next to the Kinde Management API again, and select Manage scopes.

    kinde management api authorize setting

  7. Enable the scopes you want for this application (e.g., read:users, create:users, read:roles, create:roles).

    kinde manage scopes dialog

  8. Select Save.

2. Get app keys

Link to this section
  1. Go to the Details page and copy the app keys:

    • Domain or Custom domain (if you have set one)
    • Client ID
    • Client Secret

    You need these details when you call the Kinde Management API.

3. Get an M2M access token

Link to this section
  1. Make a curl request with your app keys to get an access token:

    Terminal window
    curl --request POST \
    --url 'https://<YOUR_DOMAIN>/oauth2/token' \
    --header 'content-type: application/x-www-form-urlencoded' \
    --data 'grant_type=client_credentials' \
    --data 'client_id=<YOUR_CLIENT_ID>' \
    --data 'client_secret=<YOUR_CLIENT_SECRET>' \
    --data 'audience=https://<your_business>.kinde.com/api'

A successful response includes your access token:

{
"access_token": "<your_access_token>", // the JWT access token
"expires_in": 86399,
"scope": "", // any subset of the scopes you defined in the request
"token_type": "Bearer",
}

See Call the Kinde Management API for an extended list of programming languages you can use to call the Kinde API.

4. Call the Management API

Link to this section
  1. Make a curl request with your M2M access token to call an endpoint on the Management API:

    Terminal window
    curl --request GET \
    --url 'https://<YOUR_DOMAIN>/api/v1/users' \
    --header 'Authorization: Bearer <your_m2m_access_token>'

See The Kinde Management API for all available endpoints and actions you can perform.

Test using the API dashboard

Link to this section

1. Get the test token

Link to this section
  1. Go to Settings > Environment > APIs in your Kinde dashboard.

  2. Select View details on the Kinde Management API.

  3. Select Test in the menu.

  4. Select your M2M application from the dropdown (e.g., “API Automation”), then select Get token.

  5. Select Use test token to open the Management API page with your domain and test token pre-populated.

    kinde test token

2. Test endpoints

Link to this section

The Kinde Management API page opens with your domain and test token pre-populated. You can test endpoints from this page.

kinde management api page

  1. Search for the endpoint you want to test (e.g., roles).

  2. Select Test request in the code snippet. A pop-up opens.

    kinde management api test request

  3. Select Send to see the response JSON.

    Sample response:

    {
    "code": "OK",
    "roles": [
    {
    "id": "1234",
    "key": "admin",
    "name": "Admin",
    "description": null,
    "is_default_role": false
    },
    {
    "id": "5678",
    "key": "content-moderator",
    "name": "Content Moderator",
    "description": "Can read and update posts for content moderation purposes",
    "is_default_role": false
    }
    ],
    "message": "Success",
    "next_token": "Mjo6Om5hbWVfYXNj"
    }

Now that you have set up an authorized M2M app, see the following guides: