Create password-grant client
Overview
Create a Passport password-grant client used to issue tokens via the password flow. Emits audit OAUTH_CLIENT_PASSWORD_GRANT_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/password-client
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
bearer token. Grouped under admin/super-admin in the route file.
Rate limit
- No rate limit.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Client name (passed to createPasswordGrantClient). |
user_id | integer | Required | Required by validation; not otherwise consumed by the controller. |
{
"name": "Example Name",
"user_id": 1
}How it works
- Creates a public password-grant client, so
client_secretis returned asnull— the password grant is used without a client secret. Returns 200 withclient_idandclient_secret(asnull) on success. Returns 422 on validation failure.
Response
200 OK · 200
200{
"data": {
"client_id": "019eeeca-3391-71b2-9d4c-2f7c9a1e5abc",
"client_secret": null
}
}422 Validation error · 422
422{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
],
"user_id": [
"The user id field is required."
]
}
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
422 | Validation error |
500 | Unexpected server error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/sso/create/password-client" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name": "Example Name", "user_id": 1}'Updated 11 days ago
Did this page help you?
