Get customer sign-in settings
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/settings/auth';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/stores/example/settings/auth \ --header 'x-api-key: <x-api-key>'Returns how shoppers may sign in to the storefront (password, Google, one-time email code), whether they must verify their email, how long sessions last and the password rules. A store that never changed them gets the defaults.
Required scopes: read:settings
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
Whether shoppers can sign in with email and password.
Whether shoppers can sign in with Google.
Whether shoppers can sign in with a one-time code sent by email.
Whether a shopper must verify their email address before first sign-in.
How many days a shopper stays signed in.
How many minutes a shopper’s access token stays valid. Read-only: it cannot be changed through this API.
Minimum password length.
Whether a password must contain a digit.
Whether a password must contain a symbol.
Whether a password must contain an upper-case letter.
Example generated
{ "password_enabled": true, "google_enabled": true, "otp_enabled": true, "require_email_verification": true, "session_ttl_days": 1, "access_token_ttl_minutes": 1, "password_min_length": 1, "password_require_number": true, "password_require_symbol": true, "password_require_uppercase": true}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}