session_expired
The Connect session lifetime has elapsed. Start a new session.
HTTP 410The resource has expired and is no longer available.
When it fires
You called a Connect session endpoint with an id whose lifetime has elapsed. Connect sessions are short-lived on purpose so a stale link cannot connect an account hours later.
Response shape
Every Repull error follows the same envelope. The code is stable and safe to switch on.
{
"error": {
"code": "session_expired",
"message": "<human-readable explanation of what went wrong>",
"docs_url": "https://repull.dev/docs/errors/session_expired"
}
}How to fix
- Start a fresh session: `POST /v1/connect/{provider}` with the same `redirectUrl`.
- Hand the new `url` to the user immediately — do not store it for later.
- On the callback, complete the session right away rather than queuing it.
Examples
curl
# Start a new session
curl -X POST https://api.repull.dev/v1/connect/airbnb \
-H "Authorization: Bearer sk_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"redirectUrl": "https://your-app.com/callback"}'
# {
# "id": "cs_01HXYZ...",
# "url": "https://repull.dev/connect/airbnb?session=cs_01HXYZ...",
# "expires_at": "2026-05-02T13:34:56Z"
# }TypeScript
import { Repull } from '@repull/sdk'
const repull = new Repull({ apiKey: process.env.REPULL_KEY! })
try {
await repull.connect.complete(sessionId, payload)
} catch (err: any) {
if (err.code === 'session_expired') {
// Mint a new session and redirect the user
const fresh = await repull.connect.create({
provider: 'airbnb',
redirectUrl: 'https://your-app.com/callback',
})
return { redirectTo: fresh.url }
}
throw err
}If you're an AI agent
The Connect session lifetime ran out. Mint a new session with POST /v1/connect/{provider} and redirect the user to the fresh URL. Do not retry the original session id.
Related
- Error reference — the full table of error codes
- Using Repull from AI agents — patterns for handling errors in agent loops
- Connect (multi-channel)
Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.
AI