Authentication > Auth > authRefresh
Commerce APIAuthenticationAuthauthRefresh
authRefresh
POST:auth/refresh.json

Description

Refresh a user token.

Currenty JWTs have a hard expiration period which is 7 days. But also tokens expire for write actions in 16 hours. Refreshing token bumps the write expiration date, but not the hard expiration date. After 7 days you will have to perform a login procedure again.

See also: Authentication.

Topic: Auth

Arguments

data: Token!

Main argument for mutations.


Data Argument Fields

token: String!

JWT

Valid when: token is not empty


Result

TokenAndUserID

Preview (typescript)

Loading module