Why OAuth
A merchant connects their store to your app only through OAuth 2.0 authorization code. They are redirected to your site to approve scopes — Vambe never collects their credentials in a form. The access token you return is the credential Vambe uses for every outbound call.Fixed redirect URI
Register this exact callback in your OAuth app:The flow
Merchant starts the connection
In Vambe the merchant clicks Connect on your app. Vambe builds the authorization URL
from your
oauth.authorize_url and redirects the merchant’s browser to:Merchant approves on your site
Your authorization page authenticates the merchant and asks them to approve the scopes.
You redirect back with a code
Redirect to the fixed
redirect_uri with the code and the original state:Vambe exchanges the code
Vambe POSTs your Respond with JSON:
oauth.token_url (application/x-www-form-urlencoded):The
access_token you return is sent back to you as Authorization: Bearer … on every
outbound call. Make it a token that authorizes API access for that specific store.(Optional) Vambe fetches the store identity
If you set Vambe stores
oauth.account_info_url, Vambe immediately calls it (GET, with
Authorization: Bearer {access_token}) and expects:external_id on the installation. This is required for multi-store apps:
it lets inbound webhooks resolve which merchant an event belongs to (see
Inbound Webhooks → resolving the installation).After connection
Vambe creates an installation (an api token) bound to your app, holding the merchant’saccess_token (encrypted) and external_id. From here:
- You can start pushing inbound webhooks for that store.
- Vambe can call your outbound capabilities for that store.
Token refresh: store the
refresh_token and expires_in you return; managed refresh on
Vambe’s side is on the roadmap. For now, return long-lived access tokens or tokens you can
validate server-side on each outbound call.