About scopes and Kinde API access
SDKs and APIs
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.
To complete this procedure, you need to have set up the app. See relevant instructions below.
This final step needs to be performed in your own app, using that app’s language. The steps below simulate the process 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.
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>
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 1Note: 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:
Copy the URL from the call to url
and paste it in a browser’s address bar. This should redirect you to get authenticated.
Authorize the requested scopes for the application. You will be redirected to the URL defined in the Kinde to application
.
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>
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
endpointNote: 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.
You’re ready to use the connection. Below is an example API call to Google Drive.
https://www.googleapis.com/drive/v3/files
.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.