Registering an OAuth app
Fill in app details
Provide the following information:
- App name — displayed to users during authorization
- Description — brief explanation of what your app does
- Homepage URL — your application’s public homepage
- Redirect URIs — one or more callback URLs where Mavio sends the authorization code after user consent (must use HTTPS in production)
- Logo — optional app icon displayed on the consent screen
Receive credentials
After registration, you receive:
- Client ID — a public identifier for your app (
mavio_client_xxxxxxxxxxxx) - Client Secret — a confidential key used to exchange codes for tokens
Authorization flow
Mavio uses the standard OAuth 2.0 authorization code flow:Step 1: Redirect the user
Direct the user to the Mavio authorization endpoint:Step 2: User grants consent
Mavio displays a consent screen showing your app name, logo, and requested permissions. The user clicks Authorize or Deny.Step 3: Handle the callback
On approval, Mavio redirects to yourredirect_uri with an authorization code:
state parameter matches what you sent in step 1.
Step 4: Exchange the code
Make a server-side POST request to exchange the code for tokens:Step 5: Receive tokens
Scopes
Request only the scopes your application needs. See the full scope reference in API Keys.Refreshing tokens
Access tokens expire after 1 hour. Use the refresh token to obtain a new access token:Managing your OAuth app
From Settings > Developer > OAuth Apps, you can:- Edit app details, redirect URIs, and logo
- View stats — active authorizations count, API calls made
- Regenerate client secret — invalidates the current secret (update your server immediately)
- Revoke all tokens — immediately invalidates all user authorizations
- Delete app — permanently removes the app and revokes all tokens
Troubleshooting
Redirect URI mismatch error
Redirect URI mismatch error
The
redirect_uri in your authorization request must exactly match one of the URIs registered for your app, including protocol, host, port, and path. Check for trailing slashes and query parameters.Invalid client secret
Invalid client secret
Client secrets are shown only once. If lost, regenerate the secret from the OAuth app settings. Update your server configuration immediately after regeneration.
Token expired errors
Token expired errors
Access tokens expire after 1 hour. Implement automatic token refresh in your integration. If the refresh token is also expired (after 30 days of inactivity), prompt the user to re-authorize.
User denied authorization
User denied authorization
Scope not authorized
Scope not authorized