CheckIfPhoneNumberIsOptedOut
Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your Amazon Web Services 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.
- AuthorizationError
-
Indicates that the user has been denied access to the requested resource.
HTTP Status Code: 403
- 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 Amazon Web Services account.
HTTP Status Code: 429
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: