To use it, register your app first: email hello@yousonder.com with your app’s name, website, logo and the exact redirect URL(s) you’ll use. We send back a
client_id and a client_secret.1. Send the author to Sonder
If the author isn’t signed in to Sonder, they sign in first and come straight back to the Allow screen.
2. The author comes back
- Allowed:
https://yourapp.com/sonder/callback?code=…&state=… - Cancelled:
https://yourapp.com/sonder/callback?error=access_denied&state=…
state matches what you stored.
3. Trade the code for a key
Codes last 10 minutes and work once. Exchange from your server, never the browser:access_token is an API key. Use it exactly like a pasted one: Authorization: Bearer …. There’s no refresh token because it doesn’t expire.
After connecting
- The author sees your app in Sonder under Settings → API keys as a Connected app and can disconnect it there. Your calls then return
401 api_key_revoked. - If the author connects again, the new key replaces the old one, which stops working.
- Errors from the token endpoint follow OAuth 2.0:
{ "error": "invalid_grant", "error_description": "…" }. See the reference.