Gets information about an existing M2M Client.
Get M2M Client
Path parameters
The ID of the client.
Response fields
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
The M2M Client affected by this operation.
The ID of the client.
A human-readable name for the client.
A human-readable description for the client.
The last four characters of the client secret.
The last four characters of the next_client_secret. Null if no next_client_secret exists.
The status of the client - either active or inactive.
An array of scopes assigned to the client.
An arbitrary JSON object for storing application-specific data.
const stytch = require('stytch');
const client = new stytch.Client({
project_id: 'PROJECT_ID',
secret: 'SECRET',
});
const params = {
client_id: "m2m-client-test-d731954d-dab3-4a2b-bdee-07f3ad1be885",
};
client.m2m.clients.get(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"m2m_client": {
"client_id":"m2m-client-test-d731954d-dab3-4a2b-bdee-07f3ad1be885",
"client_name":"Example client name",
"client_description":"Example client description.",
"client_secret_last_four":"DzJj",
"next_client_secret_last_four":null,
"status":"active",
"scopes":["read:users","write:users"],
"trusted_metadata":{}
}
}
{
"status_code": 404,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "m2m_client_not_found",
"error_message": "The m2m client requested could not be found.",
"error_url": "https://stytch.com/docs/api/errors/404"
}
{
"status_code": 429,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "too_many_requests",
"error_message": "Too many requests have been made.",
"error_url": "https://stytch.com/docs/api/errors/429"
}
{
"status_code": 500,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "internal_server_error",
"error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
"error_url": "https://stytch.com/docs/api/errors/500"
}