Add connected apps

Link to this section

Connected apps let your users access third party tools and services through Kinde. When you add a connection, you’ll need to define which features (or scopes) that you want to be made available.

To get the connection up and running, you’ll need to do some steps in Kinde and some in the app you are connecting.

Before you add a connected app

Link to this section

Step 1: Add the connected app in Kinde

Link to this section
  1. In Kinde, go to Settings > Connected apps.
  2. Select Connect an app. A dialog opens.
  3. Select the connected app you want from the available apps.
  4. Select Save. The app will appear in the list of your connected apps.
  5. Select Configure on the tile and copy the Provider to Kinde callback URL.
  6. Next: Set up the app. See instructions for setting up apps below.

Step 2: Set up the app you want to connect

Link to this section

Step 3: Configure the connected app in Kinde

Link to this section

To complete this procedure, you need to have set up the app. See relevant instructions below.

  1. In Kinde, go to Settings > Connected apps.
  2. On the app tile, select Configure.
  3. On the Details tab:
    1. Enter a name.
    2. Enter the Client ID and Client secret from the app, e.g. Google Drive.
    3. Enter a reference key that will be used in your app’s code.
    4. Enter the callback URL for your app.
    5. Select Save.
  4. In the Permissions tab, select the permissions (scopes) that you want to access via the connection.
  5. Select Save. The next time a user signs in, they will be prompted to allow the above permissions.

Step 4: Get an access token via the Kinde Management API

Link to this section

This final step needs to be performed in your own app, using that app’s language. The steps below simulate the process in Postman.

  1. Get the user ID of one of your users by calling the following API in Postman: https://yourdomain.kinde.com/api/v1/users. In the below example, the id of the only user in the business is kp:xxxxx...

    Note: The user’s endpoint is a Kinde management API endpoint, therefore you will need a token to call this API.

  2. Using Postman, call the auth url endpoint to get a URL that will allow you to connect, e.g. to Google. The URL is: https://<KINDE_URL>/api/v1/connected_apps/auth_url?key_code_ref=<KEY>&user_id=<USER_ID>

  3. Replace:

    • <KINDE_URL> with your Kinde business url, e.g. mybiz.kinde.com
    • <KEY> with the unique key you gave your connected app
    • <USER_ID> with the user id you got in step 1

    Note: The auth_url endpoint is a Kinde management API endpoint, therefore you will need a token to call this API.

    You will get back a URL and session_id in the response if the call was successful:

    Getting session_id in Postman
    Getting session_id in Postman
  4. Copy the URL from the call to url and paste it in a browser’s address bar. This should redirect you to get authenticated.

  5. Authorize the requested scopes for the application. You will be redirected to the URL defined in the Kinde to application .

  6. Use Postman to call the connected_apps/token API to get an access token that has been granted the scopes you have defined previously. The URL is: https://<KINDE_URL>/api/v1/connected_apps/token?session_id=<SESSION_ID>

  7. Replace:

    • <KINDE_URL> with your Kinde business url, e.g. mybiz.kinde.com
    • <SESSION_ID> with the session_id that was returned when calling the auth_url endpoint

    Note: The connected_apps/token endpoint is a Kinde management API endpoint, therefore you will need a token.

    You will get an access token back from the call. This token can be used to call the connected services.

  8. You’re ready to use the connection. Below is an example API call to Google Drive.

Example connected app access - Google Drive

Link to this section
  1. In your code or using Postman, call the Google Drive API to list files. The URL is https://www.googleapis.com/drive/v3/files .
  2. You will need to use the access token you obtained earlier, and pass it as a bearer token in the Authorization header. Here’s what the call and return looks like.
Calling Google Drive API in Postman
Calling Google Drive API in Postman

Disconnect a connected app

Link to this section

You can disconnect a connected app from Kinde, however this does not revoke permissions. To revoke permissions you need to call the /connected apps/revoke endpoint.

  1. Go to Settings > Connected Apps.
  2. Select the three dots menu on the tile for the connected app, then select Disconnect. A confirmation window pops up.
  3. Select Disconnect.

Talk to us

If you can’t find what you’re looking for in our help center — email our team

Contact support