OAuth clients

List, create, update and delete OAuth clients, and rotate their secrets.

list_clients

List an organization’s OAuth clients. Maps to GET /organizations/:org/clients.

NameTypeRequiredDescription
orgstringYesOrganization id (org_…) or slug

Returns the list of clients.

create_client

Create an OAuth client. Maps to POST /organizations/:org/clients.

NameTypeRequiredDescription
orgstringYesOrganization id (org_…) or slug
namestringYesClient name, e.g. Acme web
redirect_urisarray of string (URL)Nohttps, or http on loopback
confidentialbooleanNoWhether the client gets a secret
ip_allowlistarray of stringNo

Returns the created client. A confidential client’s secret is in this result once, and only here.

update_client

Change a client’s name, logo, redirect URIs, confidential flag or IP allowlist. The fields you pass are the fields that change. Maps to PATCH /organizations/:org/clients/:client_id.

NameTypeRequiredDescription
orgstringYesOrganization id (org_…) or slug
client_idstringYesThe client to update
namestringNo
logostring (URL)No
redirect_urisarray of string (URL)No
confidentialbooleanNo
ip_allowlistarray of stringNo

Returns the updated client.

rotate_client_secret

Mint a new secret for a confidential client, invalidating the old one. Maps to POST /organizations/:org/clients/:client_id/secret.

NameTypeRequiredDescription
orgstringYesOrganization id (org_…) or slug
client_idstringYesThe confidential client

Returns the new secret, once, and only here.

delete_client

Delete an OAuth client. Maps to DELETE /organizations/:org/clients/:client_id.

NameTypeRequiredDescription
orgstringYesOrganization id (org_…) or slug
client_idstringYesThe client to delete

Returns OK (no content).