Menu
Amazon Simple Notification Service
API Reference (API Version 2010-03-31)

CheckIfPhoneNumberIsOptedOut

Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. You cannot send SMS messages to a number that is opted out.

To resume sending messages, you can opt in the number by using the OptInPhoneNumber action.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

phoneNumber

The phone number for which you want to check the opt out status.

Type: String

Required: Yes

Response Elements

The following element is returned by the service.

isOptedOut

Indicates whether the phone number is opted out:

  • true – The phone number is opted out, meaning you cannot publish SMS messages to it.

  • false – The phone number is opted in, meaning you can publish SMS messages to it.

Type: Boolean

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalError

Indicates an internal service error.

HTTP Status Code: 500

InvalidParameter

Indicates that a request parameter does not comply with the associated constraints.

HTTP Status Code: 400

Throttled

Indicates that the rate at which requests have been submitted for this action exceeds the limit for your account.

HTTP Status Code: 429

See Also

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