SocialMessaging class
Amazon Web Services End User Messaging Social, also referred to as Social messaging, is a messaging service that enables application developers to incorporate WhatsApp into their existing workflows. The Amazon Web Services End User Messaging Social API provides information about the Amazon Web Services End User Messaging Social API resources, including supported HTTP methods, parameters, and schemas.
The Amazon Web Services End User Messaging Social API provides programmatic access to options that are unique to the WhatsApp Business Platform.
If you're new to the Amazon Web Services End User Messaging Social API, it's also helpful to review What is Amazon Web Services End User Messaging Social in the Amazon Web Services End User Messaging Social User Guide. The Amazon Web Services End User Messaging Social User Guide provides tutorials, code samples, and procedures that demonstrate how to use Amazon Web Services End User Messaging Social API features programmatically and how to integrate functionality into applications. The guide also provides key information, such as integration with other Amazon Web Services services, and the quotas that apply to use of the service.
Regional availability
The Amazon Web Services End User Messaging Social API is available across several Amazon Web Services Regions and it provides a dedicated endpoint for each of these Regions. For a list of all the Regions and endpoints where the API is currently available, see Amazon Web Services Service Endpoints and Amazon Web Services End User Messaging endpoints and quotas in the Amazon Web Services General Reference. To learn more about Amazon Web Services Regions, see Managing Amazon Web Services Regions in the Amazon Web Services General Reference.
In each Region, Amazon Web Services maintains multiple Availability Zones. These Availability Zones are physically isolated from each other, but are united by private, low-latency, high-throughput, and highly redundant network connections. These Availability Zones enable us to provide very high levels of availability and redundancy, while also minimizing latency. To learn more about the number of Availability Zones that are available in each Region, see Amazon Web Services Global Infrastructure.
Constructors
- SocialMessaging({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
associateWhatsAppBusinessAccount(
{WhatsAppSetupFinalization? setupFinalization, WhatsAppSignupCallback? signupCallback}) → Future< AssociateWhatsAppBusinessAccountOutput> - This is only used through the Amazon Web Services console during sign-up to associate your WhatsApp Business Account to your Amazon Web Services account.
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createWhatsAppFlow(
{required List< MetaFlowCategory> categories, required String flowName, required String id, String? cloneFlowId, Uint8List? flowJson, bool? publish}) → Future<CreateWhatsAppFlowOutput> -
Creates a new WhatsApp Flow. Flows enable businesses to create rich,
interactive forms and experiences that users can complete without leaving
WhatsApp. The Flow is created in DRAFT status. If
publishis set totrueand a validflowJsonis provided, the Flow is published immediately. -
createWhatsAppMessageTemplate(
{required String id, required Uint8List templateDefinition}) → Future< CreateWhatsAppMessageTemplateOutput> - Creates a new WhatsApp message template from a custom definition.
-
createWhatsAppMessageTemplateFromLibrary(
{required String id, required MetaLibraryTemplate metaLibraryTemplate}) → Future< CreateWhatsAppMessageTemplateFromLibraryOutput> - Creates a new WhatsApp message template using a template from Meta's template library.
-
createWhatsAppMessageTemplateMedia(
{required String id, S3File? sourceS3File}) → Future< CreateWhatsAppMessageTemplateMediaOutput> - Uploads media for use in a WhatsApp message template.
-
deleteWhatsAppFlow(
{required String flowId, required String id}) → Future< void> - Deletes a WhatsApp Flow permanently. Only Flows in DRAFT status can be deleted. Published or deprecated Flows cannot be deleted.
-
deleteWhatsAppMessageMedia(
{required String mediaId, required String originationPhoneNumberId}) → Future< DeleteWhatsAppMessageMediaOutput> - Delete a media object from the WhatsApp service. If the object is still in an Amazon S3 bucket you should delete it from there too.
-
deleteWhatsAppMessageTemplate(
{required String id, required String templateName, bool? deleteAllLanguages, String? metaTemplateId}) → Future< void> - Deletes a WhatsApp message template.
-
deprecateWhatsAppFlow(
{required String flowId, required String id}) → Future< void> - Deprecates a published WhatsApp Flow, marking it as no longer recommended for use. The Flow must be in PUBLISHED status. This is an irreversible operation.
-
disassociateWhatsAppBusinessAccount(
{required String id}) → Future< void> - Disassociate a WhatsApp Business Account (WABA) from your Amazon Web Services account.
-
getLinkedWhatsAppBusinessAccount(
{required String id}) → Future< GetLinkedWhatsAppBusinessAccountOutput> - Get the details of your linked WhatsApp Business Account.
-
getLinkedWhatsAppBusinessAccountPhoneNumber(
{required String id}) → Future< GetLinkedWhatsAppBusinessAccountPhoneNumberOutput> - Retrieve the WABA account id and phone number details of a WhatsApp business account phone number.
-
getWhatsAppFlow(
{required String flowId, required String id}) → Future< GetWhatsAppFlowOutput> - Retrieves the metadata and status of a WhatsApp Flow, including validation errors, preview information, and health status.
-
getWhatsAppFlowPreview(
{required String flowId, required String id, bool? invalidate}) → Future< GetWhatsAppFlowPreviewOutput> - Generates a web preview URL for testing a WhatsApp Flow before publishing. Preview URLs expire in 30 days and can be shared with stakeholders for review.
-
getWhatsAppMessageMedia(
{required String mediaId, required String originationPhoneNumberId, S3File? destinationS3File, S3PresignedUrl? destinationS3PresignedUrl, bool? metadataOnly}) → Future< GetWhatsAppMessageMediaOutput> -
Get a media file from the WhatsApp service. On successful completion the
media file is retrieved from Meta and stored in the specified Amazon S3
bucket. Use either
destinationS3FileordestinationS3PresignedUrlfor the destination. If both are used then anInvalidParameterExceptionis returned. -
getWhatsAppMessageTemplate(
{required String id, String? metaTemplateId, String? templateLanguageCode, String? templateName}) → Future< GetWhatsAppMessageTemplateOutput> - Retrieves a specific WhatsApp message template.
-
listLinkedWhatsAppBusinessAccounts(
{int? maxResults, String? nextToken}) → Future< ListLinkedWhatsAppBusinessAccountsOutput> - List all WhatsApp Business Accounts linked to your Amazon Web Services account.
-
listTagsForResource(
{required String resourceArn}) → Future< ListTagsForResourceOutput> - List all tags associated with a resource, such as a phone number or WABA.
-
listWhatsAppFlowAssets(
{required String flowId, required String id, int? maxResults, String? nextToken}) → Future< ListWhatsAppFlowAssetsOutput> - Lists the assets (Flow JSON definition) of a WhatsApp Flow with presigned download URLs. Download URLs are generated by Meta and expire after a short period.
-
listWhatsAppFlows(
{required String id, int? maxResults, String? nextToken}) → Future< ListWhatsAppFlowsOutput> - Lists all WhatsApp Flows for a WhatsApp Business Account. Returns summary information including Flow ID, name, status, and categories.
-
listWhatsAppMessageTemplates(
{required String id, int? maxResults, String? nextToken}) → Future< ListWhatsAppMessageTemplatesOutput> - Lists WhatsApp message templates for a specific WhatsApp Business Account.
-
listWhatsAppTemplateLibrary(
{required String id, Map< String, String> ? filters, int? maxResults, String? nextToken}) → Future<ListWhatsAppTemplateLibraryOutput> - Lists templates available in Meta's template library for WhatsApp messaging.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postWhatsAppMessageMedia(
{required String originationPhoneNumberId, S3File? sourceS3File, S3PresignedUrl? sourceS3PresignedUrl}) → Future< PostWhatsAppMessageMediaOutput> -
Upload a media file to the WhatsApp service. Only the specified
originationPhoneNumberIdhas the permissions to send the media file when using SendWhatsAppMessage. You must use eithersourceS3FileorsourceS3PresignedUrlfor the source. If both or neither are specified then anInvalidParameterExceptionis returned. -
publishWhatsAppFlow(
{required String flowId, required String id}) → Future< void> - Publishes a WhatsApp Flow, making it available for use in template messages. The Flow must be in DRAFT status with valid Flow JSON that passes Meta's validation. This is an irreversible operation.
-
putWhatsAppBusinessAccountEventDestinations(
{required List< WhatsAppBusinessAccountEventDestination> eventDestinations, required String id}) → Future<void> - Add an event destination to log event data from WhatsApp for a WhatsApp Business Account (WABA). A WABA can only have one event destination at a time. All resources associated with the WABA use the same event destination.
-
sendWhatsAppMessage(
{required Uint8List message, required String metaApiVersion, required String originationPhoneNumberId}) → Future< SendWhatsAppMessageOutput> - Send a WhatsApp message. For examples of sending a message using the Amazon Web Services CLI, see Sending messages in the Amazon Web Services End User Messaging Social User Guide .
-
tagResource(
{required String resourceArn, required List< Tag> tags}) → Future<TagResourceOutput> - Adds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value.
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceArn, required List< String> tagKeys}) → Future<UntagResourceOutput> - Removes the specified tags from a resource.
-
updateWhatsAppFlow(
{required String flowId, required String id, List< MetaFlowCategory> ? categories, String? flowName}) → Future<void> - Updates the metadata of a WhatsApp Flow, such as its name or categories. This does not update the Flow JSON definition. Use UpdateWhatsAppFlowAssets to update the Flow JSON.
-
updateWhatsAppFlowAssets(
{required String flowId, required Uint8List flowJson, required String id}) → Future< UpdateWhatsAppFlowAssetsOutput> - Updates the Flow JSON definition (assets) of a WhatsApp Flow. Updating a published Flow's assets reverts it to DRAFT status, requiring re-publishing.
-
updateWhatsAppMessageTemplate(
{required String id, bool? ctaUrlLinkTrackingOptedOut, String? metaTemplateId, String? parameterFormat, String? templateCategory, Uint8List? templateComponents, String? templateLanguageCode, String? templateName}) → Future< void> - Updates an existing WhatsApp message template.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited