Create a social verification record

POST /api/verifications/social

Create a social verification record and return the authorization URI.

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.

  • scope string

    The custom scopes of the social verification. It can be used to request specific permissions from the social identity provider. If provided, it will override the scope configured in the connector settings.

  • connectorId string Required

    The Logto connector ID.

Responses

  • 201 application/json

    Successfully created the social verification record and returned the authorization URI.

    Hide response attributes Show response attributes object
    • verificationRecordId string Required

      The ID of the verification record.

    • authorizationUri string Required

      The authorization URI to navigate to for authentication and authorization in the connected social identity provider.

    • expiresAt string Required

      The expiration date and time of the verification record.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    The connector specified by connectorId is not found.

  • 422

    The connector specified by connectorId is not a valid social connector.

POST /api/verifications/social
curl \
 --request POST 'https://[tenant_id].logto.app/api/verifications/social' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"state":"string","redirectUri":"string","scope":"string","connectorId":"string"}'
Request examples
{
  "state": "string",
  "redirectUri": "string",
  "scope": "string",
  "connectorId": "string"
}
Response examples (201)
{
  "verificationRecordId": "string",
  "authorizationUri": "string",
  "expiresAt": "string"
}