Authorizations
Body
application/json
curl --request POST \
--url https://platform.versori.com/api/connect/v1/o/{organisation_id}/connectors/{connector_id}/oauth2/initialise \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"credential": {
"id": "<string>",
"organisationId": "<string>"
},
"authorizeUrl": "<string>",
"clientId": "<string>",
"scopes": [
"<string>"
],
"disableOfflineAccess": true,
"prompt": "<string>",
"additionalParams": "<string>"
}'{
"url": "<string>"
}InitialiseOAuth2Connection returns a URL to redirect the user to an OAuth 2.0 Provider’s Authorize endpoint.
Only URLs constructed via this API can be used to connect to an OAuth 2.0 connector within
Versori, since a state parameter is generated and validated upon redirection to the
redirect_uri.
Additional query parameters can be added to the resultant URL via the additionalParams
property in the body. In addition to the standard parameters defined in the body, this API
adds the following parameters:
redirect_uri: The URI to redirect the user to after the OAuth 2.0 Provider has
authenticated the user.state: A secure string generated by the API to authenticate requests to the redirect URI.prompt: See documentation on the prompt property of the request body.scope: See documentation on the scopes property of the request body.response_type: The response type to use. This is always code for OAuth 2.0.client_id: The client ID provided by the request body, this must match the client ID
which is stored under the provided credentialId otherwise the handling of the redirect
request will fail.Full details on the standard parameters can be found in the OIDC Core specification: https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
curl --request POST \
--url https://platform.versori.com/api/connect/v1/o/{organisation_id}/connectors/{connector_id}/oauth2/initialise \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"credential": {
"id": "<string>",
"organisationId": "<string>"
},
"authorizeUrl": "<string>",
"clientId": "<string>",
"scopes": [
"<string>"
],
"disableOfflineAccess": true,
"prompt": "<string>",
"additionalParams": "<string>"
}'{
"url": "<string>"
}