Skip to content
  • SDKs and APIs
  • Kinde Management API

Call the Kinde Management API with Postman

This guide walks you through setting up Postman to authenticate with the Kinde Management API using OAuth 2.0 client credentials, and shows you how to make your first API calls to list and create users.

  • A Postman client installed on your machine
  • A Kinde M2M application with Management API access, and app keys see the quickstart guide
  • Minimum scopes for this example: create:users and read:users

Postman tutorial

Link to this section

1. Create a Postman environment

Link to this section

We recommend that you set up a Postman environment and test this in a non-production space first.

  1. On your Postman client, select the No environment dropdown from the top right and select the plus icon to create a new environment.

    Creating a new environment in Postman

  2. Enter a name for the environment (e.g., Local).

  3. Copy the app keys from your M2M application and enter them as environment variables:

    • KINDE_DOMAIN - https://<your_subdomain>.kinde.com
    • M2M_CLIENT_ID - the client ID from your M2M application
    • M2M_CLIENT_SECRET - the client secret from your M2M application

    Local environment variables in Postman

  4. Mark the client secret variable as Sensitive so it will not accidentally leak to your team.

2. Get the access token

Link to this section
  1. Go to Collections. Create a new collection (e.g., Kinde).

    Creating a new collection in Postman

  2. In the three dots menu next to the new Kinde folder, select Add request.

  3. Go to the Authorization section and set the Type to OAuth 2.0 and make sure the Header Prefix is set to Bearer.

    authorization configuration in Postman

  4. In the Configure New Token section, set the Grant Type to Client Credentials.

    grant type configuration in Postman

  5. Enter the Access Token URL using the domain variable you created above: {{KINDE_DOMAIN}}/oauth2/token.

  6. Enter the Client ID and Client Secret using the environment variables you created earlier.

  7. Scroll down and select Advanced. In the Token request section, add a new audience key and enter {{KINDE_DOMAIN}}/api in the Value field. Ensure it is being sent in the Request Body.

    advanced audience parameter in Postman token request

  8. Scroll down to the Authorization section and select Get New Access Token. You should see a confirmation message.

  9. Select Proceed.

  10. Select Use Token. You now have an access token for making requests to the Kinde Management API. Optionally, set a name for the token for easier identification.

    M2M access token obtained in Postman

3. Test the API endpoints

Link to this section

Get users list from API:

  1. Create a new request.

  2. In the URL field, use the /api/v1/users endpoint: https://<your_subdomain>.kinde.com/api/v1/users

  3. Go to the Authorization section and select OAuth 2.0 as the Auth Type.

  4. Select the Token from the previously saved token.

  5. Select Send.

  6. You should see a list of your account users in the response body.

    users response body in Postman

Create a new user with API:

  1. Create a new request, set the type to POST and the URL to https://<your_subdomain>.kinde.com/api/v1/user.

  2. Go to Body, select raw and enter the following JSON:

    {
    "profile": {},
    "identities": [
    {"type": "email", "is_verified": true, "details": {"email": "jamesbond@mi6.com"}},
    {
    "type": "phone",
    "is_verified": false,
    "details": {"phone": "+61426148233", "phone_country_id": "au"}
    },
    {"type": "username", "details": {"username": "jamesbond007"}}
    ]
    }

    This will create a new user in your Kinde business.

  3. Set the Authorization as before.

  4. Select Send.

  5. You should see a success response with the new user in the response body section.

    {
    "id": "kp_1234",
    "created": true,
    "identities": [
    {
    "type": "email",
    "result": {
    "created": true
    }
    },
    {
    "type": "phone",
    "result": {
    "created": true
    }
    },
    {
    "type": "username",
    "result": {
    "created": true
    }
    }
    ]
    }
  6. Go to your Kinde dashboard > Users and you should see the new user in the list.

Troubleshooting

Link to this section

Authentication failed

Link to this section

Error message:

invalid_client, Description: Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).

Solution:

Verify that you have copied the correct domain, client ID, and client secret, with no typos.

Missing audience

Link to this section

Error message:

403 Forbidden: Missing or incorrect Management API audience.

Solution:

Verify that you have added the correct audience value https://<your-subdomain>.kinde.com/api to the audience parameter in Step 2 of this doc.

Scope is missing

Link to this section

Error message:

403 Forbidden: SCOPE_MISSING

Solution:

Add the missing scopes to your M2M application, get a new access token and try again.

Now that Postman is configured to call the Kinde Management API, explore it to automate your account actions. Check out the Kinde Management API for all available endpoints.