Skip to main content
POST
/
v1
/
users
/
{user_id}
/
connected_apps
/
{connected_app_id}
/
revoke
C#
// POST /v1/users/{user_id}/connected_apps/{connected_app_id}/revoke
const stytch = require('stytch');

const client = new stytch.Client({
  project_id: '${projectId}',
  secret: '${secret}',
});

const params = {
  user_id: "${userId}",
  connected_app_id: "${exampleConnectedAppClientID}",
};

client.Users.Revoke(params)
  .then(resp => { console.log(resp) })
  .catch(err => { console.log(err) });
{
  "request_id": "<string>",
  "status_code": 123
}
Revoke a Connected App’s access to a User and revokes all active tokens that have been created on the User’s behalf. New tokens cannot be created until the User completes a new authorization flow with the Connected App.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

user_id
string
required

The unique ID of a specific User. You may use an external_id here if one is set for the user.

connected_app_id
string
required

The ID of the Connected App.

Body

application/json

Request type

Response

Successful response

request_id
string
required

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.

status_code
integer<int32>
required