2. Token API Specification - Gluzberg/cart-api GitHub Wiki

Retrieve New Token

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}
  • Error Response:

    • Code: 401 UNAUTHORIZED
  • 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.json under Jwt:Expire provided hours.

⚠️ **GitHub.com Fallback** ⚠️