2. Token API Specification - Gluzberg/cart-api GitHub Wiki
Retrieve a new security token for the Cart API
-
URL
/token
-
Method:
POST -
Data Params
{"username": string, "password": string} -
Success Response:
-
Code:
200 OK
Content:{"token": string}
-
Code:
-
Error Response:
-
Code:
401 UNAUTHORIZED
-
Code:
-
Sample Call:
POST /api/token HTTP/1.1 Content-Type: application/json {"username": "[email protected]", "password": "secret_password"} -
Notes:
-
The token is valid for 24 hours.
-
The expiration duration can be modified in the
appsettings.jsonunderJwt:Expireprovided hours.
-