# town.delve.contact.verifyPhone

> Published by [delve.town](https://lexicon.garden/identity/did:plc:qzqct2rrq4u2gmy5g3mjxske)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.contact.verifyPhone)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.contact.verifyPhone/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.contact.verifyPhone/examples)

## Definitions

### `town.delve.contact.verifyPhone`

**Type**: `procedure`

Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string` | Yes | The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. |
| `phone` | `string` | Yes | The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `token` | `string` | Yes | JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. |

#### Errors

- **RateLimitExceeded**
- **InvalidDid**
- **InvalidPhone**
- **InvalidCode**
- **InternalError**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.",
      "errors": [
        {
          "name": "RateLimitExceeded"
        },
        {
          "name": "InvalidDid"
        },
        {
          "name": "InvalidPhone"
        },
        {
          "name": "InvalidCode"
        },
        {
          "name": "InternalError"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "code": {
              "description": "The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`.",
              "type": "string"
            },
            "phone": {
              "description": "The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`.",
              "type": "string"
            }
          },
          "required": [
            "phone",
            "code"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "token": {
              "description": "JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call.",
              "type": "string"
            }
          },
          "required": [
            "token"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "town.delve.contact.verifyPhone",
  "lexicon": 1
}
```
