Skip to content
Pasqal Documentation

Authentication with Auth0

The Pasqal Cloud platform uses Auth0 for authentication. You can retrieve tokens directly for custom integrations.

Authentication tokens are required to interact with Pasqal public APIs. There are two methods to obtain tokens depending on your use case:

  • User Authentication: For individual users with email and password
  • Service Account Authentication: For third-party integrations using client credentials

Individual users can retrieve an access token using their email and password credentials.

Terminal window
curl --request POST \
--url https://pasqal.eu.auth0.com/oauth/token \
--header 'Content-Type: application/json' \
--data '{
"client_id": "eiSaMfiINjiaXr0tnc2Bh1Mr6XPQ1BDK",
"username": "{{user_email}}",
"password": "{{user_password}}",
"audience": "https://apis.pasqal.cloud/account/api/v1",
"scope": "openid profile email",
"realm": "pcs-users",
"grant_type": "http://auth0.com/oauth/grant-type/password-realm"
}'
ParameterDescription
client_idThe application client identifier
usernameYour registered email address
passwordYour account password
audienceThe target API endpoint
scopeRequested permissions (openid, profile, email)
realmAuthentication realm for users
grant_typeOAuth grant type for password authentication

Pasqal may provide a service account for machine-to-machine interactions between clients/third-parties and Pasqal cloud services. A token can then be generated without a username and password.

Terminal window
curl --request POST \
--url https://pasqal.eu.auth0.com/oauth/token \
--header 'Content-Type: application/json' \
--data '{
"client_id": "{{service_account_client_id}}",
"client_secret": "{{service_account_client_secret}}",
"audience": "https://apis.pasqal.cloud/account/api/v1",
"grant_type": "client_credentials"
}'
ParameterDescription
client_idService account client identifier
client_secretService account secret key
audienceThe target API endpoint
grant_typeOAuth grant type for client credentials

A successful authentication request returns a JSON response containing:

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6...",
"scope": "openid profile email",
"expires_in": 86400,
"token_type": "Bearer"
}
FieldDescription
access_tokenJWT token to authenticate API requests
token_typeToken type (always “Bearer”)
expires_inToken validity duration in seconds
scopeGranted permissions

Include the access token in the Authorization header for all API requests:

Terminal window
curl --request GET \
--url https://apis.pasqal.cloud/service/api/version/endpoint \
--header 'Authorization: Bearer {{access_token}}'

Last updated: