Lifebots symbol
Lifebots.cloud
OAuth 2.0 API
API Reference › OAuth

Exchange Code for Tokens

POST/oauth/token

Swap the authorization code for an access token. Codes are single-use and expire quickly. Confidential apps send client_secret; public apps send code_verifier instead.

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

curl -X POST "https://api.lifebots.cloud/api/v1/oauth/token" \
  --data-urlencode "grant_type=authorization_code" \
  --data-urlencode "client_id=your_client_id" \
  --data-urlencode "client_secret=your_client_secret" \
  --data-urlencode "code=AUTH_CODE" \
  --data-urlencode "redirect_uri=https://yourapp.com/oauth/callback"

Path parameters

None.

Body (application/x-www-form-urlencoded)

NameTypeRequiredDescription
grant_typestringyesauthorization_code
client_idstringyesYour client_id.
client_secretstringnoRequired for confidential apps. Never send from a browser or mobile app.
codestringyesThe code from the redirect.
redirect_uristringyesThe same redirect_uri used in the authorize request.
code_verifierstringnoRequired when the authorize request had a code_challenge (always for public apps).

Example response

{
  "access_token": "lb_at_…",
  "token_type": "Bearer",
  "scope": "read:profile bots:chat",
  "refresh_token": "lb_rt_…",
  "expires_in": 3600,
  "refresh_token_expires_in": 2592000
}

expires_in / refresh_token_expires_in are omitted when the app's tokens never expire; refresh_token is omitted when refresh is disabled for the app.

Lifebots symbol
Lifebots.cloud

Empowering Second Life experiences with intelligent bot automation and seamless group management solutions.

Product
Support
Company
Visit Us

© 2025 - 2026 LifeBots. Made with ❤️. All rights reserved.

LifeBots is not affiliated with Linden Research, Inc., or any of its affiliated entities or products, including, without limitation, Second Life (collectively, “Linden Lab”).

Initializing A New World of Second Life Bots...