Guides

Connect your first provider

Create an OAuth connection without managing token refreshes.

Start an authorization session

Create a connection session from your backend and redirect the user to the returned authorization_url. Include an internal user identifier so your app can associate the completed connection with the right account.

curl -X POST https://api.lumen.dev/v1/connections -H "Authorization: Bearer $LUMEN_API_KEY" -H "Content-Type: application/json" -d '{"provider":"github","external_user_id":"usr_123"}'
curl -X POST https://api.lumen.dev/v1/connections -H "Authorization: Bearer $LUMEN_API_KEY" -H "Content-Type: application/json" -d '{"provider":"github","external_user_id":"usr_123"}'
curl -X POST https://api.lumen.dev/v1/connections -H "Authorization: Bearer $LUMEN_API_KEY" -H "Content-Type: application/json" -d '{"provider":"github","external_user_id":"usr_123"}'

Handle completion

Lumen exchanges and encrypts provider tokens, then sends connection.created to your webhook. Store the connection ID, not the provider token. Use that ID for subsequent API calls.

Create a free website with Framer, the website builder loved by startups, designers and agencies.