Get connector's authorization URI

POST /api/connectors/{connectorId}/authorization-uri

Get authorization URI for specified connector by providing redirect URI and randomly generated state.

Path parameters

  • connectorId string Required

    The unique identifier of the connector.

application/json

Body Required

  • state string Required

    A random string generated on the client side to prevent CSRF (Cross-Site Request Forgery) attacks.

  • redirectUri string Required

    The URI to navigate back to after the user is authenticated by the connected social identity provider and has granted access to the connector.

Responses

  • 200 application/json

    Successfully built authorization URI.

    Hide response attributes Show response attributes object
    • redirectTo string(url) Required
    • The URI to navigate for authentication and authorization in the connected social identity provider.

  • Unable to build authorization URI.

  • Unauthorized

  • Forbidden

  • The connector with the specified ID does not exist.

POST /api/connectors/{connectorId}/authorization-uri
curl \
 -X POST https://[tenant_id].logto.app/api/connectors/{connectorId}/authorization-uri \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"state":"string","redirectUri":"string"}'
Request examples
{
  "state": "string",
  "redirectUri": "string"
}
Response examples (200)
{
  "redirectTo": "string"
}