Skip to content

Sns  >  Operations  >  opt_in_phone_number

opt_in_phone_number

Operation

opt_in_phone_number async

opt_in_phone_number(input: OptInPhoneNumberInput, plugins: list[Plugin] | None = None) -> OptInPhoneNumberOutput

Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.

You can opt in a phone number only once every 30 days.

Parameters:

Name Type Description Default
input OptInPhoneNumberInput

An instance of OptInPhoneNumberInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
OptInPhoneNumberOutput

An instance of OptInPhoneNumberOutput.

Input

OptInPhoneNumberInput dataclass

Input for the OptInPhoneNumber action.

Attributes

phone_number class-attribute instance-attribute
phone_number: str | None = field(repr=False, default=None)

The phone number to opt in. Use E.164 format.

Output

OptInPhoneNumberOutput dataclass

The response for the OptInPhoneNumber action.