User Get Connected Apps retrieves a list of Connected Apps with which the User has successfully completed an authorization flow. If the User revokes a Connected App's access (e.g. via the Revoke Connected App endpoint) then the Connected App will no longer be returned in the response.
Get Connected Apps
GET
https://test.stytch.com/v1/users/{user_id}/connected_appsPath parameters
user_id* string
The unique ID of a specific User. You may use an external_id here if one is set for the user.
Response fields
request_id string
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.
connected_apps array[objects]
An array of Connected Apps with which the User has successfully completed an authorization flow.
connected_app_id string
The ID of the Connected App.
name string
The name of the Connected App.
description string
A description of the Connected App.
client_type string
The type of Connected App. Supported values are first_party, first_party_public, third_party, and third_party_public.
logo_url string
The logo URL of the Connected App, if any.
scopes_granted string
The scopes granted to the Connected App at the completion of the last authorization flow.
const stytch = require('stytch');
const client = new stytch.Client({
project_id: 'PROJECT_ID',
secret: 'SECRET',
});
const params = {
user_id: "user-test-16d9ba61-97a1-4ba4-9720-b03761dc50c6",
};
client.users.connectedApps(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });
RESPONSE 200
200
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"connected_apps": [
{
"client_type": "first_party",
"connected_app_id": "connected-app-test-aeadeabc-a3a3-4796-83d0-b757e3001000",
"description": "A first party connected app",
"logo_url": null,
"name": "first-party-confidential-app",
"scopes_granted": "openid profile email"
}
]
}
RESPONSE 401
200
{
"status_code": 401,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "unauthorized_credentials",
"error_message": "Unauthorized credentials.",
"error_url": "https://stytch.com/docs/api/errors/401"
}
RESPONSE 429
200
{
"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"
}
RESPONSE 500
200
{
"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"
}