API Reference › OAuth
Authorize (browser redirect)
GET
/oauth/authorizeSend the user's browser here. They sign in, review the scopes and approve; LifeBots then redirects to your redirect_uri with ?code=…&state=…, or ?error=access_denied if they decline. If the user already approved the same scopes, the redirect is immediate.
Authorization and token management. These follow the OAuth 2.0 spec and answer in plain OAuth JSON (no success/data envelope). Errors use the standard error and error_description fields.
Usage
# Open this URL in the user's browser
https://lifebots.cloud/oauth/authorize?client_id=your_client_id&redirect_uri=https%3A%2F%2Fyourapp.com%2Foauth%2Fcallback&scope=read%3Aprofile%20bots%3Achat&state=xyz123Path parameters
None.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
client_id | string | yes | Your application's client_id. |
redirect_uri | string | yes | Must exactly match a redirect URI registered on the app. |
scope | string | yes | Space-separated list of scopes. |
state | string | no | Random value echoed back on the redirect. Check it to stop CSRF. Strongly recommended. |
code_challenge | string | no | PKCE challenge: base64url(SHA-256(code_verifier)). Required for public apps. |
code_challenge_method | string | no | S256 (recommended) or plain. |
Example response
{
"redirect": "https://yourapp.com/oauth/callback?code=AUTH_CODE&state=xyz123"
}302 redirect to redirect_uri.