/v1/apps/{app_id}/credentials/{client_id}AuthGet M2M client details
Path parameters
app_id*stringId of the app.
client_id*stringId of the client.
Response · 200
id*stringUnique identifier of the M2M client.
app_id*stringThe Auth app the M2M client belongs to.
client_id*stringThe M2M client id (used as `client_id` in the client-credentials grant).
name*stringName of the M2M client.
is_active*booleanWhether the client can obtain tokens.
last_used_at*string · date-timeWhen the M2M client was last used (ISO 8601), or `null` if never.
created_at*string · date-timeWhen the M2M client was created (ISO 8601).
scopes*arrayScopes granted to the M2M client.
Example
Request
GET https://api.auth.productcraft.co/v1/apps/{app_id}/credentials/{client_id}
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const m2mClientDetail = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").credentials.retrieve("m2m_a1b2c3d4e5f6");auth.admin.app(…).credentials.retrieve(clientId, options?): Auth.M2mClientDetail
Response
{
"id": "string",
"app_id": "string",
"client_id": "string",
"name": "string",
"is_active": false,
"last_used_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"scopes": [
{
"resource": "user",
"action": "read"
}
]
}