v2

latestOpenAPI 3.0.12026-07-26334612609.5 KB
SDK

Oauth provider verify endpoint

Standard OAuth verify callback to exchange temproary code for oauth access

post/sdk/{environmentId}/providers/{providerType}/verify

Path parameters

environmentIdstring required
Example:95b11417-f18f-457f-8804-68e361f9164f

ID of the environment

providerType'emailOnly' | 'magicLink' | 'apple' | 'bitbucket' | 'coinbasesocial' | 'discord' | 'epicgames' | 'facebook' | 'farcaster' | 'github' | 'gitlab' | 'google' | 'instagram' | 'linkedin' | 'microsoft' | 'twitch' | 'twitter' | 'blocto' | 'banxa' | 'coinbaseOnramp' | 'cryptoDotCom' | 'dynamic' | 'alchemy' | 'zerodev' | 'telegram' | 'turnkey' | 'coinbaseWaas' | 'sms' | 'spotify' | 'tiktok' | 'line' | 'steam' | 'shopify' | 'zksync' | 'kraken' | 'blockaid' | 'passkey' | 'okta' | 'sendgrid' | 'resend' required

The 'turnkey' value is deprecated and will be removed in a future version.

Type of external auth provider

Request body

codestring

Temporary auth code for oauth2 access

codeVerifierstring

Temporary auth code verifier for oauth2 access

statestring required

Temporary auth state for oauth2 access

captchaTokenstring

Optional captcha token to verify that the user is not a bot

sessionPublicKeystring
ssoProviderIdstring

Example request

{
  "sessionPublicKey": "An example name",
  "ssoProviderId": "95b11417-f18f-457f-8804-68e361f9164f"
}

Response

Success

mfaTokenstring
jwtstring

Encoded JWT token. This will only be returned when cookie-based authentication is disabled in favor of standard Auth header based authentication.

minifiedJwtstring

Encoded JWT token. This will only be returned when cookie-based authentication is disabled in favor of standard Auth header based authentication.

expiresAtnumber required

Format is a unix-based timestamp. When set, this will be the expiration timestamp on the JWT sent using either the jwt field or a response httpOnly cookie set by the server.

Example response

{
  "jwt": "jwt_value",
  "user": {
    "id": "95b11417-f18f-457f-8804-68e361f9164f",
    "projectEnvironmentId": "95b11417-f18f-457f-8804-68e361f9164f",
    "verifiedCredentials": [
      {
        "address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
        "refId": "95b11417-f18f-457f-8804-68e361f9164f",
        "signerRefId": "95b11417-f18f-457f-8804-68e361f9164f",
        "id": "95b11417-f18f-457f-8804-68e361f9164f",
        "wallet_properties": {
          "turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
          "turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
          "turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
          "turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f"
        },
        "phoneNumber": "9171113333",
        "phoneCountryCode": "1",
        "isoCountryCode": "US",
        "previous_users": [
          "95b11417-f18f-457f-8804-68e361f9164f"
        ]
      }
    ],
    "lastVerifiedCredentialId": "95b11417-f18f-457f-8804-68e361f9164f",
    "sessionId": "95b11417-f18f-457f-8804-68e361f9164f",
    "alias": "An example name",
    "country": "US",
    "firstName": "An example name",
    "jobTitle": "An example name",
    "lastName": "An example name",
    "tShirtSize": "An example name",
    "team": "An example name",
    "username": "An example name",
    "scope": "superuser marketing operations",
    "missingFields": [
      {
        "validationRules": {
          "regex": "^0x",
          "validOptions": [
            {
              "label": "small"
            },
            {
              "label": "medium"
            },
            {
              "label": "large"
            }
          ],
          "checkboxText": "Agree to the terms and conditions"
        }
      }
    ]
  },
  "minifiedJwt": "jwt_value"
}