Register a client (once per origin)
POST
/oauth/register
const url = 'https://api.harperharbor.com/oauth/register';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"client_name":"Your app","redirect_uris":["https://app.example.com/oauth/callback"],"grant_types":["authorization_code","refresh_token"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.harperharbor.com/oauth/register \ --header 'Content-Type: application/json' \ --data '{ "client_name": "Your app", "redirect_uris": [ "https://app.example.com/oauth/callback" ], "grant_types": [ "authorization_code", "refresh_token" ] }'Dynamic client registration. Redirect URIs must be https (http://localhost and loopback IPs are accepted for
development) and must not contain a fragment. Persist the returned client_id, keyed by origin.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
client_name
required
string
redirect_uris
required
Array<string>
grant_types
required
Array<string>
Example
{ "client_name": "Your app", "redirect_uris": [ "https://app.example.com/oauth/callback" ], "grant_types": [ "authorization_code", "refresh_token" ]}Responses
Section titled “Responses”Registered.
Media typeapplication/json
object
client_id
string
key
additional properties
any
Examplegenerated
{ "client_id": "example"}