{ "parameters": [ ], "response_fields": [ ], "requests": [ { "request_headers": { "Content-Type": "application/json" }, "request_query_parameters": { }, "response_headers": { "X-Frame-Options": "SAMEORIGIN", "X-XSS-Protection": "1; mode=block", "X-Content-Type-Options": "nosniff", "X-Download-Options": "noopen", "X-Permitted-Cross-Domain-Policies": "none", "Referrer-Policy": "strict-origin-when-cross-origin", "Content-Type": "application/json; charset=utf-8", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers": "*", "Access-Control-Allow-Methods": "GET, POST, PATCH, PUT, DELETE, OPTIONS", "X-Requested-With": "", "Vary": "X-Requested-With, X-Flash-Messages", "ETag": "W/\"f5c9346693cf83a66994fd508d3a8d98\"", "Cache-Control": "no-cache, no-store, must-revalidate", "X-Request-Id": "ccde8c8f-f8b5-482a-a052-d869cad4f317", "X-Runtime": "0.256992", "Expires": "0", "Content-Length": "76" }, "request_method": "POST", "request_path": "/api/storefront/authentication_tokens", "request_body": "{\"email\":\"user400@workarea.com\",\"password\":\"p@assword!\"}", "request_content_type": "application/json", "response_status": 200, "response_status_text": "OK", "response_body": "{\n \"token\": \"CZUsXvX9o1bE9ugo35qFxtsT\",\n \"expires_at\": \"2019-08-29T17:06:42.626Z\"\n}", "response_content_type": "application/json", "curl": "curl \"https://www.example.com/api/storefront/authentication_tokens\" -d '{\"email\":\"user400@workarea.com\",\"password\":\"p@assword!\"}' -X POST \\\n\t-H \"Content-Type: application/json\"" } ], "resource": "Authentication", "description": "Creating an authentication token", "route": "/api/storefront/authentication_tokens", "http_method": "POST", "explanation": " Creating an authentication token is the first step in user\n authentication. You will use this token to authenticate requests on\n behalf of the user going forward. To get a token you can use to\n authenticate an account, use this endpoint. You'll need the email\n and password from the user, and we'll issue a token that can be used\n to authenticate further requests for that customer. This token will\n expire after 7 days.\n Tokens are also invalidated when a user changes their password. See\n the \"using an authentication token\" example for how to use an\n authentication token.\n" }