Connect Email Provider (Initiate OAuth)
Changed onInitiate OAuth flow to connect user's email inbox.
Returns an oauth_url that you should redirect the user to. After authorization, they are redirected back to your redirect_uri with the following query parameters:
On success:
- inbox_token - Encrypted token to store client-side
- email - Email address of the connected account
- state - Your original state parameter (for CSRF verification)
On error:
- error - Error code (e.g., access_denied, token_exchange_failed)
- state - Your original state parameter
Store the inbox_token client-side and use it for all subsequent inbox API calls. The token is long-lived (it stores an encrypted refresh token), so a single OAuth connect gives ongoing access to both historical and future CAS statements in the user's inbox. Reuse the same token until the user revokes access via /v4/inbox/disconnect or their provider's account settings.
Request
- Base URLhttps://api.casparser.in
- AuthAPI key in header x-api-key
Request body
Example request
{
"redirect_uri": "https://yourapp.com/oauth-callback",
"state": "abc123",
"provider": "outlook"
}Response
OAuth URL generated successfully
Example response
{
"status": "success",
"oauth_url": "https://accounts.google.com/o/oauth2/v2/auth?client_id=...",
"provider": "outlook",
"expires_in": 600
}Changes
- warning
the optional response header
X-Request-IDremoved for the status401
- warning
- warning
added the new
zohoenum value to theresponse property for the response status - info
added the new
zohoenum value to the request property
- warning