---
title: "Auto-authenticate a client"
method: POST
path: "/ext/v2/accounts/auto-auth/"
tags: ["Accounts"]
---

# Auto-authenticate a client

`POST /ext/v2/accounts/auto-auth/`

## Request

- Base URL: `https://connect.vetcove.com`
- URL: `https://connect.vetcove.com/ext/v2/accounts/auto-auth/`
- Auth: HTTP bearer

This endpoint is available to Group API Keys only.

Generates an auto-authentication token that allows a clinic client (pet parent) to be seamlessly signed into the Vetcove client shopping portal without requiring them to enter credentials.

This is typically used to provide a direct link from an application or client communication into the Vetcove shopping experience. The client is identified by their email address or phone number.

## Request body

- ExternalAutoAuthRequestSchema
  - `client_email` string, nullable: The client's email address. At least one of client_email, client_phone_number, or clinic_client_user_id must be provided.
  - `client_phone_number` integer, nullable: The client's phone number. At least one of client_email, client_phone_number, or clinic_client_user_id must be provided.
  - `clinic_client_user_id` integer, nullable: The ID of the clinic client user to authenticate. When provided, client_email and client_phone_number are ignored. At least one of client_email, client_phone_number, or clinic_client_user_id must be provided.
  - `clinic_id` integer, required: The ID of the clinic the client belongs to

## Response `201`

Created

- ExternalDetailAutoAuthSchema: Schema for auto-auth response data.
  - `auto_auth_token` string, required: The generated auto-authentication token.
  - `base_url` string, required: The base URL for the Vetcove client shopping portal with the auto-auth token applied.
  - `embed_url` string, required: A URL for the Vetcove client shopping portal designed to be embedded in an iframe.
  - `expiry` integer, required: The expiry time of the token, as a Unix timestamp in seconds.
  - `fullscreen_url` string, required: A URL for the Vetcove client shopping portal designed for fullscreen browser use.

---

[API](https://skmtc.dev/vetcove/apis/ninjaapi.md) - [All operations](https://skmtc.dev/vetcove/apis/ninjaapi/llms.txt) - [OpenAPI document](https://skmtc.dev/vetcove/apis/ninjaapi/revisions/4ceaed956e15?raw)
