---
title: "Get auth code by phone number"
method: GET
path: "/users/login/{PhoneNumber}"
tags: ["Users"]
---

# Get auth code by phone number

`GET /users/login/{PhoneNumber}`

This method returns a code that allows you to connect the phone number to the API without the need to scan a QR code, simply by entering the generated code.

## Path parameters

- `PhoneNumber` string, required — Contact ID

## Response `200`

OK

- AuthCode — The auth code is the code that is sent to the user's phone app to authenticate the user.
  - `code` string — The auth code

## Other responses

- `400` — Invalid phone number
- `406` — Not acceptable for mobile type channel
- `409` — Channel already authenticated
- `422` — Render QR failed
- `500` — Internal Error

---

[API](https://skmtc.dev/whapi/apis/whatsapp-api.md) · [All operations](https://skmtc.dev/whapi/apis/whatsapp-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/whapi/whatsapp-api/revisions/40ab05abffdb/schema)
