Guest Machines
DevelopersApi referenceAuthentication

Register an integration

POST/api/v1/oauth-clients

Register an integration and receive its client ID and client secret. The secret is returned only once.

Required access

Credentials: user session

This is a human installation step for a signed-in organization admin or owner. Do not store the user session as an integration credential.

Authorization

UserSession
AuthorizationBearer <token>

A short-lived bearer token for a signed-in person. Use it only for the human integration-installation and consent steps; never store it as an integration credential.

In: header

Header Parameters

X-Org-Id?|

Selects the active organization for a direct user session that has more than one membership. Service-principal keys and delegated tokens are each bound to one organization and ignore it.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Payload for registering an OAuth client.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/oauth-clients" \  -H "Authorization: Bearer $GUEST_MACHINES_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "MCP library integration",    "description": "Maintains the organization\'s connector library.",    "allowed_scopes": [      "mcp_servers:list",      "mcp_servers:read",      "mcp_servers:create",      "mcp_servers:edit",      "mcp_servers:delete",      "mcp_servers:publish"    ]  }'
{  "oauth_client": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",    "name": "string",    "description": "string",    "client_id": "string",    "client_secret_prefix": "string",    "allowed_scopes": [      "string"    ],    "status": "active",    "created_by_user_id": "209f54c4-4c33-43bc-9c6a-ef4c65ad7473",    "revoked_at": "2019-08-24T14:15:22Z",    "last_used_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  },  "client_secret": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}