Kinde Management API Quickstart Guide
SDKs and APIs
Kinde’s Account API uses a user’s access token to retrieve data like roles, permissions, profile, billing entitlements, and more. You can call these endpoints from a browser because each request is scoped to the user the token represents.
Most of the data you can access via the Account API is read-only (except for a few OAuth methods). Account API data is surfaced through a browser token, and passing data this way is less secure. If you want to do more with the API, check out the Kinde Management API.
Kinde uses the logged-in user’s access token to access the Account API.
Get the access token using the relevant SDK or manually if you are using Kinde without an SDK.
import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";
const { getAccessTokenRaw } = getKindeServerSession();const accessToken = await getAccessTokenRaw();
console.log(accessToken); // use your access tokenCall the relevant Account API endpoint:
fetch('<YOUR_DOMAIN>/account_api/v1/entitlements', { headers: { Authorization: `Bearer ${accessToken}` }}).then(response => { if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return response.json();}).then(data => console.log(data)).catch(error => console.error('Error:', error));Replace <YOUR_DOMAIN> with either your custom domain (e.g., https://auth.yourbusiness.com) or your Kinde domain (https://your_business.kinde.com).
user_profile endpoint. You can also introspect the token or revoke it.See the Account API library for the full list of endpoints and their usage. If you want an endpoint to be added, contact us at support@kinde.com.