OAuth Clients
GET
https://api.restorehub.net /api/v1/servers/{id}/oauth-clients List OAuth clients
Required scope: oauth-clients:read
Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://api.restorehub.net/api/v1/servers/{id}/oauth-clients" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
Example
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}Schema
errorstringHuman-readable error message
codestringMachine-readable error code (optional)
detailsobjectValidation issues (optional)
requiredScopestringRequired scope (on 403 only)
yourScopesstring[]Your key's scopes (on 403 only)
POST
https://api.restorehub.net /api/v1/servers/{id}/oauth-clients Create an OAuth client (returns clientSecret once)
Required scope: oauth-clients:write
Parameters
idstringpathrequiredRequest body
application/json
namestringrequiredredirectUrisstring[]requiredExact-match allow-list. https only (http allowed for localhost); no fragments.
scopesstring[]Must include openid. Default: openid, profile, email.
isPublicbooleantrue = public PKCE client with no secret. Default false.
{
"name": "string",
"redirectUris": [
"string"
],
"scopes": [
"openid"
],
"isPublic": true
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/servers/{id}/oauth-clients" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","redirectUris":["string"],"scopes":["openid"],"isPublic":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}GET
https://api.restorehub.net /api/v1/servers/{id}/oauth-clients/{clientId} Get an OAuth client
Required scope: oauth-clients:read
Parameters
idstringpathrequiredclientIdstringpathrequiredCode samples
cURL
curl -X GET "https://api.restorehub.net/api/v1/servers/{id}/oauth-clients/{clientId}" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}DELETE
https://api.restorehub.net /api/v1/servers/{id}/oauth-clients/{clientId} Delete an OAuth client (ends its sessions)
Required scope: oauth-clients:write
Parameters
idstringpathrequiredclientIdstringpathrequiredCode samples
cURL
curl -X DELETE "https://api.restorehub.net/api/v1/servers/{id}/oauth-clients/{clientId}" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}PATCH
https://api.restorehub.net /api/v1/servers/{id}/oauth-clients/{clientId} Update an OAuth client
Required scope: oauth-clients:write
Parameters
idstringpathrequiredclientIdstringpathrequiredRequest body
application/json
namestringredirectUrisstring[]scopesstring[]{
"name": "string",
"redirectUris": [
"string"
],
"scopes": [
"openid"
]
}Code samples
cURL
curl -X PATCH "https://api.restorehub.net/api/v1/servers/{id}/oauth-clients/{clientId}" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","redirectUris":["string"],"scopes":["openid"]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}Updated