Skip to main content

Register

Register an OAuth client and get a client_id (dynamic client registration, RFC 7591). Use this only if you can't host a client ID metadata document, which needs no registration at all.

Every call creates a new client. Register once per app and store the client_id; don't register per user or per sign-in.

Endpoint​

POST https://api.arsel.sa/oauth/register

Returns: 201 Created

Headers​

HeaderValueRequired
Content-Typeapplication/jsonYes

No Authorization header.

Request Body​

ParameterTypeRequiredDescription
redirect_urisstring[]Yes1–10 redirect URIs, each at most 2048 characters.
client_namestringNoShown on the consent screen. Max 255 characters. Defaults to Unnamed app.
grant_typesstring[]Noauthorization_code and/or refresh_token. Defaults to both.
token_endpoint_auth_methodstringNoIf sent, must be none.
logo_uristringNoAn https URL, at most 2048 characters. Not shown on the consent screen yet.
{
"client_name": "Example CLI",
"redirect_uris": ["http://127.0.0.1/callback"]
}
curl -X POST https://api.arsel.sa/oauth/register \
-H "Content-Type: application/json" \
-d '{"client_name": "Example CLI", "redirect_uris": ["http://127.0.0.1/callback"]}'

Response​

{
"client_id": "arsel_client_3q2-7wEJgk1zZ9vT0bQfXcYp4LmN8sRd",
"client_id_issued_at": 1793961600,
"client_name": "Example CLI",
"redirect_uris": ["http://127.0.0.1/callback"],
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"],
"token_endpoint_auth_method": "none"
}
FieldTypeDescription
client_idstringYour client ID. It doesn't expire.
client_id_issued_atnumberWhen it was issued (Unix seconds)
client_namestringThe name shown on the consent screen
redirect_urisstring[]The registered redirect URIs
grant_typesstring[]The registered grant types
response_typesstring[]Always ["code"]
token_endpoint_auth_methodstringAlways none: there is no client secret

Rate Limit​

10 requests per minute per IP address. Above it the endpoint returns 429.

Error Responses​

Errors use the OAuth format, not the Arsel API error format.

{
"error": "invalid_redirect_uri",
"error_description": "redirect_uris must be 1-10 https, loopback http or private-use scheme URIs, each at most 2048 characters"
}