Skip to content

/oauth2/create-client

POST
/oauth2/create-client
curl --request POST \
--url https://gymgym.club/api/auth/oauth2/create-client \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "redirect_uris": [ "example" ], "scope": "example", "client_name": "example", "client_uri": "example", "logo_uri": "example", "contacts": [ "example" ], "tos_uri": "example", "policy_uri": "example", "software_id": "example", "software_version": "example", "software_statement": "example", "post_logout_redirect_uris": [ "example" ], "backchannel_logout_uri": "example", "backchannel_logout_session_required": true, "token_endpoint_auth_method": "example", "application_type": "web", "jwks": { "keys": [ { "additionalProperty": "example" } ] }, "jwks_uri": "example", "grant_types": [ "example" ], "response_types": [ "code" ], "dpop_bound_access_tokens": true }'

Register an OAuth2 application

Media typeapplication/json
object
redirect_uris
Array<string>
scope
string
client_name
string
client_uri
string
logo_uri
string
contacts
Array<string>
tos_uri
string
policy_uri
string
software_id
string
software_version
string
software_statement
string
post_logout_redirect_uris
Array<string>
backchannel_logout_uri
string
backchannel_logout_session_required
boolean
token_endpoint_auth_method
string
>= 1 characters
application_type
string
Allowed values: web native
jwks
object
keys
required
Array<object>
object
key
additional properties
jwks_uri
string
grant_types
Array<string>
response_types
Array<string>
Allowed values: code
dpop_bound_access_tokens
boolean

OAuth2 application registered successfully

Media typeapplication/json
object
client_id
required

Unique identifier for the client

string
client_secret

Secret key for the client

string
client_secret_expires_at

Time the client secret will expire. If 0, the client secret will never expire.

number
scope

Space-separated scopes allowed by the client

string
user_id

ID of the user who registered the client, null if registered anonymously

string
client_id_issued_at

Creation timestamp of this client

number
client_name

Name of the OAuth2 application

string
client_uri

URI of the OAuth2 application

string
logo_uri

Icon URI for the application

string
contacts

List representing ways to contact people responsible for this client, typically email addresses

Array<string>
tos_uri

Client’s terms of service uri

string
policy_uri

Client’s policy uri

string
software_id

Unique identifier assigned by the developer to help in the dynamic registration process

string
software_version

Version identifier for the software_id

string
software_statement

JWT containing metadata values about the client software as claims

string
redirect_uris

List of allowed redirect uris

Array<string>
token_endpoint_auth_method

Requested authentication method for the token endpoint

string
grant_types

Grant types the client may use at the token endpoint

Array<string>
response_types

Response types the client may use at the authorization endpoint

Array<string>
Allowed values: code
application_type

OIDC application type used to classify redirect URI policy

string
Allowed values: web native
resources

Final server-owned resources linked to the client

Array<string>
disabled

Whether the client is disabled

boolean
metadata

Additional metadata for the application

object
key
additional properties
any
Example
{
"response_types": [
"code"
],
"application_type": "web"
}

Bad Request. Usually due to missing parameters, or invalid parameters.

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Unauthorized. Due to missing or invalid authentication.

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Forbidden. You do not have permission to access this resource or to perform this action.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Not Found. The requested resource was not found.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Too Many Requests. You have exceeded the rate limit. Try again later.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Internal Server Error. This is a problem with the server that you cannot fix.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}