Skip to content

Troubleshooting failures (request_id)

When something fails between your app and Canverly (login, token exchange, refresh, an API call), the Canverly team can find the cause from a single identifier, without asking you to reproduce the problem. That identifier is the request_id.

Every error response from the OAuth flow and the API carries the same value in two places:

Where Name Note
Response header X-Request-Id Also present on success responses.
JSON error body request_id An additional field: the other error fields do not change.

If your request already sends X-Request-Id, Canverly reuses it; if not, it generates one. Use an opaque value, unique per request (UUID or ULID), with no personal data.

OAuth error (RFC 6749 format, with error and error_description):

HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Request-Id: 01JC8W3K9Q7M2X4T6V8Z0B1D3F
{
"error": "invalid_grant",
"error_description": "authorization code invalid or expired",
"request_id": "01JC8W3K9Q7M2X4T6V8Z0B1D3F"
}

API error (error envelope):

{
"error": { "code": "forbidden", "message": "scope `posts:write` not granted" },
"request_id": "01JC8W4A1R5N3Y7U9W2C4E6G8H"
}

To open a ticket about a failure, send:

Item Example
request_id The value from the header or the error response body.
client_id Your app’s public identifier.
Time in UTC 2026-10-22T14:03:27Z (with seconds).
Endpoint Method and path, such as POST /oauth/token.
What you expected and what you got HTTP status and the error field.

Never send (not by email, chat or screenshot): an access token (cvt_...), refresh token (cvr_...), id_token, authorization code, client_secret, code_verifier, API keys (ck_...), or the full request body. The team does not need them to investigate; if one shows up in a ticket, treat it as leaked and revoke it.

Without a request_id (for example, the connection dropped before the response), send client_id, UTC time and endpoint: the request can be found by time window, just less precisely.

The “Common causes” column summarizes what the team usually finds. Internal reason names are not part of the response: you only get the standard error and the request_id.

error Where Common causes What to do
invalid_request /oauth/authorize, /oauth/token Missing parameter: state, nonce, code_challenge, code_challenge_method=S256, redirect_uri. Fix the request. Do not retry in a loop.
invalid_scope /oauth/authorize, /oauth/token A scope the app may not request, or a request for more than was granted. Request only the registered scopes. See App scopes.
invalid_client /oauth/token, /oauth/revoke, /oauth/introspect Wrong secret, auth method different from the registered one, unknown or disabled app. Check client_id, secret and method. Do not retry without fixing.
invalid_grant /oauth/token code used twice or expired (60 s); redirect_uri or code_verifier different from the request; refresh expired, revoked or already used. Restart the login. For a refresh, mark the link as disconnected and ask for a new connection.
unsupported_grant_type /oauth/token A grant_type the app does not use or the server does not accept. Use authorization_code or refresh_token.
access_denied return to the redirect_uri The person denied consent. Show your own message; do not force a retry.
invalid_token API (401, WWW-Authenticate: Bearer) Access token expired or revoked. Refresh once and repeat the call.
insufficient_scope / forbidden API (403) Missing scope, or the site is outside what the person granted. Ask for the scope, or a new connection including the site.
rate_limited API (429) Per-minute quota exceeded. Honor Retry-After. See Rate limits.

An unregistered redirect_uri or unknown client_id does not return to your app: Canverly shows an error page and does not redirect. In that case there is no request_id for the app: check the app registration and, if you need help, send client_id, UTC time and the redirect_uri used.

5xx and 503 errors are transient: retry with exponential backoff and, if they persist, open a ticket with the request_id of the last attempt.

  1. Log the request_id of every error response (body or X-Request-Id), together with status, error, endpoint, time and your own internal request id. One log line per failure is enough.
  2. Generate and send your own X-Request-Id on calls to Canverly and log it. That way you can correlate on both sides even when the response is lost.
  3. Never log secrets: tokens, code, client_secret, code_verifier, id_token, the Authorization header. If you need to identify a token, log only a short hash (for example, the first 8 characters of a SHA-256).
  4. No unnecessary personal data: log the pairwise sub and your internal user id, not the email or name.
  5. Mask headers and bodies before sending them to logs or error tools (Sentry and similar): configure the list of forbidden fields above.
  6. Alert on rate, not on single events: many invalid_grant in a row on refresh suggests mass revocation; many invalid_client suggests a changed or rotated secret.

Each OAuth and API request produces a structured record on the Canverly side, tied to the request_id. It contains: time, service, event (authorize, consent, token, refresh, revoke, introspect, userinfo, API call), result (ok, recusado or erro), a summarized reason, status, latency, client_id, the pairwise sub, the organization and site identifiers, and a truncated IP (IPv4 at /24, IPv6 at /48).

Canverly does not record: access or refresh tokens, code, client_secret, code_verifier, the consent ticket, email, the full IP or the request body. The records are used only for diagnostics and security.

See also Errors and rate limits, Sign in with Canverly and Connect Canverly.