Creates a new OAuth 2.0 client registration.

Usage Example - M2M Client

POST /api/v1/auth/clients
Authorization: Bearer {token}
Content-Type: application/json

{
  "displayName": "Salesforce Production Integration",
  "m2m": true,
  "botUserId": "bot-abc123"
}

Response:

{
  "clientId": "oauth_client_xyz789",
  "clientSecret": "secret_abcdef123456"
}

⚠️ CRITICAL: The clientSecret is only returned once. Store it securely immediately.

Usage Example - Interactive Client

POST /api/v1/auth/clients
Content-Type: application/json

{
  "displayName": "My Web App",
  "redirectUri": "https://myapp.example.com/oauth/callback",
  "m2m": false
}

Next Steps (M2M)

Use client credentials to get access token:

POST /openid/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&client_id=oauth_client_xyz789
&client_secret=secret_abcdef123456
&scope=api:public
Body·CreateOAuthClientRequest
required

Client registration details

Request to create a new OAuth 2.0 client for API access.

  • m2m
    Type: boolean
    required

    Whether this is a machine-to-machine (M2M) client using client credentials flow.

  • botUserId
    Type: null | string
    max length:  
    450

    Required bot user ID for M2M clients. Optional for interactive clients.

  • displayName
    Type: null | string
    max length:  
    255

    Optional friendly name for this OAuth client (e.g., "Production CRM Integration").

  • redirectUri
    Type: null | string
    max length:  
    2000

    Redirect URI for OAuth authorization code flow. Required for interactive flows, not needed for M2M flows.

Responses
  • application/json
  • application/problem+json
  • application/problem+json
  • application/problem+json
  • application/problem+json
Request Example for post/api/v1/auth/clients
curl https://app.propstreet.com/api/v1/auth/clients \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "displayName": "Salesforce Production Integration",
  "redirectUri": "https://myapp.example.com/oauth/callback",
  "m2m": true,
  "botUserId": "bot-abc123"
}'
{
  "clientId": "oauth_client_abc123xyz",
  "clientSecret": "secret_9876543210zyxwvutsrqponmlkjihgfedcba"
}