---
title: "Authenticates a member and creates an member authentication token"
method: POST
path: "/ocapi/v1/members/authentication-token"
tags: ["Authentication"]
---

# Authenticates a member and creates an member authentication token

`POST /ocapi/v1/members/authentication-token`

This method of authentication is recommended for clients that can securely store the member authentication token access_token
and member authentication token refresh_token locally.




The member authentication token access_token must be provided as the `LoyaltySessionToken` HTTP header to authenticate subsequent requests.




Sign out is handled by deleting the stored member authentication token access_token and member authentication token refresh_token




This method can be used to both create a new access token, or refresh an expired token based on the member authentication request grant_type




Data is to be provided as `application/x-www-form-urlencoded` form parameters in the format of member authentication request




Currently, the ```external_issuer``` grant type will fail if the provided external authentication token can not be linked to a single Loyalty
member, and as such is unsuitable for social sign in flows.




#### Error Response

LockOutPeriodInSeconds property will only be present on the response object if the response has the error code 32000.

#### Licenses Required


- Vista.Ocapi

## Headers

- `Connect-Region-Code` string

## Response `200`

Success

- OcapiV1LoyaltyMembersAuthenticationMemberAuthenticationToken — Represents a successful member authentication response
  - `access_token` string, required — Gets the access token
  - `token_type` string, required — Gets the type
  - `expires_in` integer, required — Gets the expiry time in seconds
  - `refresh_token` string, nullable — Gets the refresh token

## Other responses

- `400` — The provided grant type, credentials, or refresh token are invalid.
- `429` — Member locked. Try again later.

---

[API](https://skmtc.net/vista/apis/vista-digital-platform.md) · [All operations](https://skmtc.net/vista/apis/vista-digital-platform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vista/vista-digital-platform/versions/3a81c0aed14e/schema)
