Skip to main content
To use the Stytch API and SDKs, you 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 Project ID & API keys section in your 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

Each Stytch Project has 1 Live environment and 1 Test environment by default. You can create additional test environments in the Stytch Dashboard. Each environment has a distinct Project ID, Secret, and Public token.
  • Test environments access the https://test.stytch.com API
  • Live environments access the https://api.stytch.com API
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 one environment will not be available in another environment.