Consumer Authentication

/

Guides

/

Management

/

Dashboard

/

API keys

Stytch API keys

First, you will need a Stytch account. Get your API keys by signing up.

The Stytch API uses basic authentication with your project_id and secret. You'll need to pass these values into the Authorization request header for every API call.

curl --request POST \
    --url https://test.stytch.com/v1/magic_links/email/login_or_create \
    -u 'PROJECT_ID:SECRET' \
    -H 'Content-Type: application/json' \
    -d '{
      "email": "sandbox@stytch.com",
    }'

You can find your keys in the API keys section of the Stytch Dashboard.

Frontend SDKs

For our frontend SDKs, you'll use your public_token rather than your project_id and secret when communicating with the Stytch API.

Environments

For each Stytch Project, there are two environments:

  • Test: https://test.stytch.com
  • Live: https://api.stytch.com

The Stytch API keys and data resources are all scoped to an environment and are not shared between environments. For example, a User created in the Test environment will not be available in the Live environment.