

**End of support notice:** On October 30, 2026, AWS will end support for Amazon Pinpoint. After October 30, 2026, you will no longer be able to access the Amazon Pinpoint console or Amazon Pinpoint resources (endpoints, segments, campaigns, journeys, and analytics). For more information, see [Amazon Pinpoint end of support](https://docs.aws.amazon.com/console/pinpoint/migration-guide). **Note:** APIs related to SMS, voice, mobile push, OTP, and phone number validate are not impacted by this change and are supported by AWS End User Messaging.

# Verify OTP
<a name="apps-application-id-verify-otp"></a>

Use this resource to check the validity of One-Time Passwords (OTPs) that were generated using the [OTP Message](https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-otp.html) resource.

## URI
<a name="apps-application-id-verify-otp-url"></a>

`/v1/apps/application-id/verify-otp`

## HTTP methods
<a name="apps-application-id-verify-otp-http-methods"></a>

### POST
<a name="apps-application-id-verify-otppost"></a>

**Operation ID:** `VerifyOTPMessage`

Verifies a One-Time Password that was generated by the `OTP Message` resource.


**Path parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| application-id | String | True | The unique identifier for the application. This identifier is displayed as the **Project ID** on the Amazon Pinpoint console. | 


**Header parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| accept | String | False | Indicates which content types, expressed as MIME types, the client understands. | 


**Responses**  

| Status code | Response model | Description | 
| --- |--- |--- |
| 200 | VerificationResponse | 200 response | 
| 400 | MessageBody | The request contains a syntax error (BadRequestException). | 
| 403 | MessageBody | The request was denied because access to the specified resource is forbidden (ForbiddenException). | 
| 404 | MessageBody | The request failed because the specified resource was not found (NotFoundException). | 
| 405 | MessageBody | The request failed because the method is not allowed for the specified resource (MethodNotAllowedException). | 
| 413 | MessageBody | The request failed because the payload for the body of the request is too large (RequestEntityTooLargeException). | 
| 429 | MessageBody | The request failed because too many requests were sent during a certain amount of time (TooManyRequestsException). | 
| 500 | MessageBody | The request failed due to an unknown internal server error, exception, or failure (InternalServerErrorException). | 

### OPTIONS
<a name="apps-application-id-verify-otpoptions"></a>


**Path parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| application-id | String | True | The unique identifier for the application. This identifier is displayed as the **Project ID** on the Amazon Pinpoint console. | 


**Responses**  

| Status code | Response model | Description | 
| --- |--- |--- |
| 200 | None | The request succeeded. | 

## Schemas
<a name="apps-application-id-verify-otp-schemas"></a>

### Request bodies
<a name="apps-application-id-verify-otp-request-examples"></a>

#### POST schema
<a name="apps-application-id-verify-otp-request-body-post-example"></a>

```
{
  "DestinationIdentity": "string",
  "Otp": "string",
  "ReferenceId": "string"
}
```

### Response bodies
<a name="apps-application-id-verify-otp-response-examples"></a>

#### VerificationResponse schema
<a name="apps-application-id-verify-otp-response-body-verificationresponse-example"></a>

```
{
  "Valid": boolean
}
```

#### MessageBody schema
<a name="apps-application-id-verify-otp-response-body-messagebody-example"></a>

```
{
  "RequestID": "string",
  "Message": "string"
}
```

## Properties
<a name="apps-application-id-verify-otp-properties"></a>

### MessageBody
<a name="apps-application-id-verify-otp-model-messagebody"></a>

Provides information about an API request or response.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| Message | string | False | The message that's returned from the API. | 
| RequestID | string | False | The unique identifier for the request or response. | 

### VerificationResponse
<a name="apps-application-id-verify-otp-model-verificationresponse"></a>

Provides information about the validity of the OTP code provided in the request.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| Valid | boolean | False | Specifies whether the OTP is valid or not. | 

### VerifyOTPMessageRequestParameters
<a name="apps-application-id-verify-otp-model-verifyotpmessagerequestparameters"></a>

Specifies the details of the OTP that you are validating.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| DestinationIdentity | string | True | The phone number, in E.164 format, that the OTP code was sent to. | 
| Otp | string | True | The OTP code that you are validating. | 
| ReferenceId | string | True | The reference ID that you used when you sent the OTP code to the recipient. The reference ID must be an exact match. | 

## See also
<a name="apps-application-id-verify-otp-see-also"></a>

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

### VerifyOTPMessage
<a name="VerifyOTPMessage-see-also"></a>
+ [AWS Command Line Interface V2](/goto/cli2/pinpoint-2016-12-01/VerifyOTPMessage)
+ [AWS SDK for .NET V4](/goto/DotNetSDKV4/pinpoint-2016-12-01/VerifyOTPMessage)
+ [AWS SDK for C\$1\$1](/goto/SdkForCpp/pinpoint-2016-12-01/VerifyOTPMessage)
+ [AWS SDK for Go v2](/goto/SdkForGoV2/pinpoint-2016-12-01/VerifyOTPMessage)
+ [AWS SDK for Java V2](/goto/SdkForJavaV2/pinpoint-2016-12-01/VerifyOTPMessage)
+ [AWS SDK for JavaScript V3](/goto/SdkForJavaScriptV3/pinpoint-2016-12-01/VerifyOTPMessage)
+ [AWS SDK for Kotlin](/goto/SdkForKotlin/pinpoint-2016-12-01/VerifyOTPMessage)
+ [AWS SDK for PHP V3](/goto/SdkForPHPV3/pinpoint-2016-12-01/VerifyOTPMessage)
+ [AWS SDK for Python](/goto/boto3/pinpoint-2016-12-01/VerifyOTPMessage)
+ [AWS SDK for Ruby V3](/goto/SdkForRubyV3/pinpoint-2016-12-01/VerifyOTPMessage)