Member Get Connected Apps retrieves a list of Connected Apps with which the Member has successfully completed an authorization flow. If the Member 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. A Connected App's access may also be revoked if the Organization's allowed Connected App policy changes.
Get Connected Apps
Path parameters
Globally unique UUID that identifies a specific Organization. The organization_id is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience.
Globally unique UUID that identifies a specific Member. The member_id is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member.
Header parameters
The secret token for a Member Session that should be used to perform an authorization check for this endpoint. If neither session header is passed, no authorization check will be performed. If one is passed, we will check that the Member Session contains a Role that satisfies the permission needed to call this endpoint. If it does not, or if the Member's Organization does not match the organization_id passed in the request, a 403 error will be thrown. Otherwise, the request will proceed as normal.
The JSON Web Token (JWT) for a Member Session that should be used to perform an authorization check for this endpoint. If neither session header is passed, no authorization check will be performed. If one is passed, we will check that the Member Session contains a Role that satisfies the permission needed to call this endpoint. If it does not, or if the Member's Organization does not match the organization_id passed in the request, a 403 error will be thrown. Otherwise, the request will proceed as normal.
Response fields
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.
An array of Connected Apps with which the Member has successfully completed an authorization flow.
The ID of the Connected App.
The name of the Connected App.
A description of the Connected App.
The type of Connected App. Supported values are first_party, first_party_public, third_party, and third_party_public.
The logo URL of the Connected App, if any.
The scopes granted to the Connected App at the completion of the last authorization flow.
const stytch = require('stytch');
const client = new stytch.B2BClient({
project_id: 'PROJECT_ID',
secret: 'SECRET',
});
const params = {
organization_id: "organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931",
member_id: "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
};
const options = {
authorization: {
session_token: 'mZAYn5aLEqKUlZ_Ad9U_fWr38GaAQ1oFAhT8ds245v7Q',
},
};
client.organizations.members.getConnectedApps(params, options)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });
{
"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"
}
]
}
{
"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"
}
{
"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"
}