Skip to navigation

Swap a one-time code for the workspace’s key

Your server, after Rydhm sends the admin back to your redirect_uri with code and state (check state). Form-encoded or JSON. The client authenticates with client_secret (in the body, or HTTP Basic) when the app has one, and always with the PKCE code_verifier. A code works once, for 10 minutes; presented again, the connection it made is revoked. Connecting the same app to the same workspace again replaces the earlier connection. Errors are RFC 6749: invalid_request, invalid_client (401), invalid_grant, unsupported_grant_type.

No API key: your app authenticates with its client id and secret (in the body, or HTTP Basic) and the PKCE code_verifier. Rate limited per address and per app.

Request

This endpoint expects an object.
grant_typeenumRequired
Allowed values:
codestringRequired
From the redirect.
redirect_uristringRequired
Exactly the address the connection started with.
client_idstringRequired

rydhm_app_… (or in HTTP Basic).

code_verifierstringRequired

The PKCE verifier whose S256 challenge started the connection (43–128 characters).

client_secretstringOptional

rydhm_cs_…, when the app has one (or in HTTP Basic).

Response

OK
access_tokenstring

rydhm_live_…: send it as Bearer on every call for this workspace.

token_typeenum
Allowed values:
scopestring

The granted scopes, space-separated.

workspaceobject
connection_idstring
webhook_idstring or null
webhook_secretstring or null
webhook_errorstringOptional

Why no webhook endpoint could be added (the connection works anyway).

Errors

400
Bad Request Error
401
Unauthorized Error
429
Too Many Requests Error