Langsung ke konten utama
POST
/
v3
/
stores
/
{store_id}
/
public
/
auth
/
jwt
/
refresh
Refresh a customer JWT
curl --request POST \
  --url https://api.scalev.com/v3/stores/{store_id}/public/auth/jwt/refresh \
  --header 'Content-Type: application/json' \
  --header 'X-Scalev-Storefront-Api-Key: <x-scalev-storefront-api-key>' \
  --data '
{
  "refresh": "<string>"
}
'
{
  "access": "<string>",
  "refresh": "<string>",
  "token_type": "Bearer",
  "expires_in": 900,
  "refresh_expires_in": 2592000,
  "store_unique_id": "<string>"
}

Header

X-Scalev-Storefront-Api-Key
string
wajib

Publishable storefront public API key for the target store. Page public API keys are not accepted on Storefront public routes.

Parameter Path

store_id
string
wajib

Store unique_id.

Body

application/json
refresh
string
wajib

Current customer refresh token. Refresh tokens are single-use; store the new refresh returned by this endpoint and discard the previous one.

Respons

Customer JWT tokens for a successful storefront customer login, OTP verification, or refresh.

access
string
wajib

Customer access JWT. Send it as Authorization: Bearer <token> to /v3/stores/{store_id}/customers/me/*.

refresh
string
wajib

Refresh token for POST /v3/stores/{store_id}/public/auth/jwt/refresh.

token_type
enum<string>
wajib

Token type to use in the Authorization header.

Opsi yang tersedia:
Bearer
expires_in
integer
wajib

Access token lifetime in seconds.

Contoh:

900

refresh_expires_in
integer
wajib

Refresh token lifetime in seconds. Refresh tokens rotate on every refresh and are single-use.

Contoh:

2592000

store_unique_id
string | null

Public store unique ID returned by some OTP verification responses.