Create OAuth client (authorization code grant)
Overview
Create a Passport authorization-code grant OAuth client (name + redirect URLs) owned by the authenticated user. This app acts as an OAuth Identity Provider. The plaintext client_secret comes back once, on creation only — it is hashed at rest (Passport v13) and can never be retrieved later. Emits audit OAUTH_CLIENT_CREATED.
Prerequisites
- A bearer token in the
Authorizationheader.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/sso/create/client
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
bearer token.
-
The route file groups SSO client management under admin/super-admin, but the controller enforces owner-scoping.
-
The creating user owns the client, and only its creator may view / update / delete it.
Rate limit
- No rate limit.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Human-readable client name. |
redirect_callback | array<string> | Required | One or more redirect URLs; each must be a valid http/https URL. |
{
"name": "My App",
"redirect_callback": [
"https://example.com/callback"
]
}How it works
- 200 with
client_id, one-timeclient_secret, and the echoedredirect_callback. 422 on validation failure; 500 on unexpected error.
Response
200 OK · 200
200{
"data": {
"client_id": "019eeeca-2288-73a4-ac88-7c3f105bcc22",
"client_secret": "<client-secret>",
"redirect_callback": [
"https://example.com/callback"
]
}
}422 Validation error · 422
422{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
],
"redirect_callback": [
"The redirect callback field is required."
]
}
}401 Unauthenticated · 401
401{
"message": "Unauthenticated."
}Errors
| Status | Meaning |
|---|---|
401 | Unauthenticated |
422 | Validation error |
500 | Returned on unexpected error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/sso/create/client" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name": "My App", "redirect_callback": ["https://example.com/callback"]}'Updated 11 days ago
Did this page help you?
