OAuth callback handler
Changed onFinish the OAuth sign-in: exchange the provider's <code>code</code> for tokens and store them. Call it with the <code>code</code> and <code>state</code> the provider sent to the redirect URI, as the connector's creator or an admin.<br><br> <b>Result:</b><br> Always JSON. <code>success</code> is true when the connector is signed in; otherwise <code>error</code> and <code>errorMessage</code> say why. Provider tokens are never returned.
Request
- Base URLhttps://app.pipeshub.com/api/v1
- URLhttps://app.pipeshub.com/api/v1/connectors/oauth/callback
- Auth
- HTTP bearer
- or OAuth 2Authorization code: /api/v1/oauth2/authorizeClient credentialsToken URL: /api/v1/oauth2/token scopes: connector:write
Query parameters
Authorization code from provider. A missing, empty or blank value is refused with 400, even when the provider only sent error.
State parameter (contains connector ID). A missing, empty or blank value is refused with 400.
Error code if authorization failed
Origin prefixed to the returned redirectUrl
Response
Result of exchanging the code. success is false when the provider refused it.
Example response
{
"redirectUrl": "https://pipeshub.mycompany.com/connectors/oauth/callback?oauth_error=access_denied",
"error": "access_denied"
}Changes
- breaking
added the pattern
\Sto thequeryrequest parametercode - breaking
added the pattern
\Sto thequeryrequest parameterstate - info
added the non-success response with the status
- breaking
- info
endpoint added
- info