Initiate Oauth
OAuth
Initiate Oauth
Initiate an OAuth authentication flow.
This endpoint generates an authorization URL that the user should visit to grant permissions to the integration.
Flow:
- Call this endpoint with the integration ID
- Redirect the user to the returned
auth_url - User grants permissions on the provider’s website
- Provider redirects back to the callback URL with a code
- Callback handler exchanges code for tokens and creates connection
Example:
POST /oauth/initiate
{
"integration_id": "gmail",
"auth_method_id": "oauth2",
"scopes": [
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.send"
]
}
Response:
{
"auth_url": "https://accounts.google.com/o/oauth2/v2/auth?...",
"state": "abc123...",
"integration_id": "gmail"
}
POST
Initiate Oauth
Documentation Index
Fetch the complete documentation index at: https://docs.mielto.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The workspace ID
Body
application/json
Response
Successful Response