{ "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-Workarea-Segments", "Last-Modified": "Wed, 19 Aug 2020 13:55:27 GMT", "Cache-Control": "no-cache, no-store, must-revalidate", "X-Request-Id": "3b909bbf-f9ca-4e6d-a0c3-2e1de069ec06", "X-Runtime": "0.250394", "X-Workarea-Segments": "", "Expires": "0", "Content-Length": "76" }, "request_method": "POST", "request_path": "/api/storefront/authentication_tokens", "request_body": "{\"email\":\"user19@workarea.com\",\"password\":\"p@assword!\"}", "request_content_type": "application/json", "response_status": 200, "response_status_text": "OK", "response_body": "{\n \"token\": \"AEeH9zFuEsfuyWqvQepbpHQF\",\n \"expires_at\": \"2020-08-26T13:55:27.851Z\"\n}", "response_content_type": "application/json", "curl": "curl \"https://www.example.com/api/storefront/authentication_tokens\" -d '{\"email\":\"user19@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", "explanation": "

Creating an authentication token is the first step in user
\nauthentication. You will use this token to authenticate requests on
\nbehalf of the user going forward. To get a token you can use to
\nauthenticate an account, use this endpoint. You'll need the email
\nand password from the user, and we'll issue a token that can be used
\nto authenticate further requests for that customer. This token will
\nexpire after 7 days.
\nTokens are also invalidated when a user changes their password. See
\nthe "using an authentication token" example for how to use an
\nauthentication token.

\n", "http_method": "POST" }