The MCP server at /mcp accepts two kinds of credentials. Both are sent as a bearer token, and both act for one person in one workspace. This page is the technical reference. For setup steps, see Connect with OAuth and Connect with an API key.
| OAuth access token | API key | |
|---|---|---|
| Prefix | rlo_ |
rl_live_ |
| Lifetime | 1 hour, renewed with a refresh token | Until revoked |
| Made by | The OAuth flow, after you click Allow | You, on the Developer API page |
| Revoked by | Disconnect the agent | Revoke the key |
Send either one like this:
Authorization: Bearer <token or key>The server finds out which kind it is from the prefix. A key that was revoked, or a token that expired, is treated as no credentials.
Requests without credentials
A request with no valid credentials gets 401. The response includes a WWW-Authenticate header that points to the OAuth metadata, so a client can start the sign-in on its own:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer realm="reachloom-mcp", resource_metadata="https://app.reachloom.app/.well-known/oauth-protected-resource"OAuth flow
Reachloom follows the OAuth 2.0 authorization code flow with PKCE, which MCP clients use. You do not need to do this by hand if your client supports MCP. It is listed here for people who build a client.
-
Discover. Read the protected resource metadata, then the authorization server metadata.
-
Register. The client registers itself and gets a
client_id. -
Authorize. The client sends you to
/oauth/authorizewith a PKCE challenge. You sign in, choose a workspace, and click Allow. Reachloom redirects back with acode. -
Get tokens. The client sends the
codeand its PKCE verifier to/oauth/tokenand gets an access token and a refresh token. -
Call the server. The client sends the access token to
/mcp. -
Refresh. Before the access token ends, the client sends the refresh token to
/oauth/tokenfor a new pair.
Endpoints
| Path | Purpose |
|---|---|
/.well-known/oauth-protected-resource |
Says that /mcp is the resource and which server signs people in. |
/.well-known/oauth-authorization-server |
Lists the endpoints below, the supported grants, and PKCE methods. |
/oauth/register |
Dynamic client registration. |
/oauth/authorize |
The Allow page. |
/oauth/token |
Exchanges a code or a refresh token for tokens. |
The authorization page uses your signed-in browser session and asks which workspace to connect. Metadata, registration, and token endpoints allow cross-origin requests for browser-based clients.
What Reachloom supports
| Setting | Value |
|---|---|
| Response types | code |
| Grant types | authorization_code, refresh_token |
| PKCE | S256 only |
| Client type | Public. token_endpoint_auth_method is none, so there is no client secret. |
| Scope | mcp |
1. Register a client
curl -X POST https://app.reachloom.app/oauth/register \
-H "Content-Type: application/json" \
-d '{
"client_name": "My agent",
"redirect_uris": ["http://localhost:8123/callback"]
}'The answer has status 201 and includes the client_id:
{
"client_id": "…",
"client_name": "My agent",
"redirect_uris": ["http://localhost:8123/callback"],
"token_endpoint_auth_method": "none",
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"]
}Rules for redirect_uris:
- Give 1 to 5 addresses, each at most 2048 characters.
- Use
https, an app scheme likecursor://, orhttponlocalhost,127.0.0.1, or[::1]. - No fragment, no username or password, and no
javascript:,data:,vbscript:,file:,blob:, orabout:. - For a local
httpaddress, the port may differ from the registered one at sign-in time. The host and path must match.
client_name is shown on the Allow page. It is cut to 80 characters, and the default is “MCP client”.
2. Send the person to authorize
Make a random code_verifier of 43 to 128 characters. The code_challenge is its SHA-256 hash, base64url encoded without padding. It is always 43 characters.
https://app.reachloom.app/oauth/authorize
?response_type=code
&client_id=CLIENT_ID
&redirect_uri=http%3A%2F%2Flocalhost%3A8123%2Fcallback
&code_challenge=CODE_CHALLENGE
&code_challenge_method=S256
&state=RANDOM_STATEIf the person is not signed in, Reachloom asks them to sign in and then returns to this same request. After they choose, Reachloom redirects to your redirect_uri:
- Allow:
?code=…&state=… - Deny:
?error=access_denied&state=… - Bad request:
?error=unsupported_response_typeor?error=invalid_request, when the client and redirect address are fine but the request is not.
If the client_id or the redirect_uri is wrong, Reachloom shows an error page and does not redirect. This stops the page from being used as an open redirect.
The code works once and ends after 60 seconds.
3. Exchange the code
Send a form, not JSON:
curl -X POST https://app.reachloom.app/oauth/token \
-d grant_type=authorization_code \
-d client_id=CLIENT_ID \
-d code=CODE \
-d redirect_uri=http://localhost:8123/callback \
-d code_verifier=CODE_VERIFIERThe redirect_uri must be exactly the one used in step 2. The answer:
{
"access_token": "rlo_…",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "rlr_…",
"scope": "mcp"
}4. Refresh
curl -X POST https://app.reachloom.app/oauth/token \
-d grant_type=refresh_token \
-d client_id=CLIENT_ID \
-d refresh_token=REFRESH_TOKENYou get a new access token and a new refresh token. The old refresh token stops working, so always save the new one. A refresh token ends after 30 days. Each refresh starts a new 30 days.
OAuth errors
Errors are JSON with error and error_description:
error |
When |
|---|---|
invalid_request |
A required field is missing, or the body is not a form. |
invalid_client |
The client_id is not known. |
invalid_grant |
The code or refresh token is wrong, used already, expired, or was issued to another client. The PKCE verifier does not match. |
unsupported_grant_type |
Use authorization_code or refresh_token. |
invalid_redirect_uri |
A redirect address is not allowed at registration. |
invalid_client_metadata |
The registration body is not a JSON object. |
Responses with tokens are never cached.
API keys
A key starts with rl_live_ and is followed by random characters. Create keys in the workspace under Settings → Developer API.
- Reachloom stores a hash of the key. The full value is shown once, when you create it.
- You can have up to 20 active keys per workspace.
- A key name can be up to 60 characters.
- The list shows the first characters of each key, the creation date, and the last use. The last-use time is updated at most once a minute.
- Revoking a key works at once and cannot be undone.
A key belongs to its workspace and the person who created it. It stops working if that person loses access to the workspace.
Access and limits
Both credentials use one workspace and the same preparation tools. They can read data, prepare campaigns and pages, and write drafts. They cannot send, approve, switch campaigns on, delete data, or manage settings. There is one OAuth scope, mcp. Workspace membership and usage limits still apply.
| Limit | Value |
|---|---|
| MCP requests | 120 per minute for each person and workspace |
| Token requests | 120 per minute, shared |
| Client registrations | 30 per hour, shared |
When you go over a limit, Reachloom answers 429 with a retry-after header.
Keep credentials safe
- Do not put keys or tokens in Git, prompts, screenshots, or chat.
- Use one key per tool, so you can revoke one at a time.
- Revoke a key or disconnect an agent as soon as you stop using it, or if you think it leaked.
- Use
httpsaddresses in production. Onlylocalhostmay use plainhttp.