:doc:`EndUserMessagingSocial <../../socialmessaging>` / Client / create_whatsapp_message_template_from_library

*********************************************
create_whatsapp_message_template_from_library
*********************************************



.. py:method:: EndUserMessagingSocial.Client.create_whatsapp_message_template_from_library(**kwargs)

  

  Creates a new WhatsApp message template using a template from Meta's template library.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/socialmessaging-2024-01-01/CreateWhatsAppMessageTemplateFromLibrary>`_  


  **Request Syntax**
  ::

    response = client.create_whatsapp_message_template_from_library(
        metaLibraryTemplate={
            'templateName': 'string',
            'libraryTemplateName': 'string',
            'templateCategory': 'string',
            'templateLanguage': 'string',
            'libraryTemplateButtonInputs': [
                {
                    'type': 'string',
                    'phoneNumber': 'string',
                    'url': {
                        'string': 'string'
                    },
                    'otpType': 'string',
                    'zeroTapTermsAccepted': True|False,
                    'supportedApps': [
                        {
                            'string': 'string'
                        },
                    ]
                },
            ],
            'libraryTemplateBodyInputs': {
                'addContactNumber': True|False,
                'addLearnMoreLink': True|False,
                'addSecurityRecommendation': True|False,
                'addTrackPackageLink': True|False,
                'codeExpirationMinutes': 123
            }
        },
        id='string'
    )
    
  :type metaLibraryTemplate: dict
  :param metaLibraryTemplate: **[REQUIRED]** 

    The template configuration from Meta's library, including customizations for buttons and body text.

    

  
    - **templateName** *(string) --* **[REQUIRED]** 

      The name to assign to the template.

      

    
    - **libraryTemplateName** *(string) --* **[REQUIRED]** 

      The name of the template in Meta's library.

      

    
    - **templateCategory** *(string) --* **[REQUIRED]** 

      The category of the template (for example, UTILITY or MARKETING).

      

    
    - **templateLanguage** *(string) --* **[REQUIRED]** 

      The language code for the template (for example, en_US).

      

    
    - **libraryTemplateButtonInputs** *(list) --* 

      Button customizations for the template.

      

    
      - *(dict) --* 

        Configuration options for customizing buttons in a template from Meta's library.

        

      
        - **type** *(string) --* 

          The type of button (for example, QUICK_REPLY, CALL, or URL).

          

        
        - **phoneNumber** *(string) --* 

          The phone number in E.164 format for CALL-type buttons.

          

        
        - **url** *(dict) --* 

          The URL with dynamic parameters for URL-type buttons.

          

        
          - *(string) --* 

          
            - *(string) --* 

            
      
    
        - **otpType** *(string) --* 

          The type of one-time password for OTP buttons.

          

        
        - **zeroTapTermsAccepted** *(boolean) --* 

          When true, indicates acceptance of zero-tap terms for the button.

          

        
        - **supportedApps** *(list) --* 

          List of supported applications for this button type.

          

        
          - *(dict) --* 

          
            - *(string) --* 

            
              - *(string) --* 

              
        
      
      
      
  
    - **libraryTemplateBodyInputs** *(dict) --* 

      Body text customizations for the template.

      

    
      - **addContactNumber** *(boolean) --* 

        When true, includes a contact number in the template body.

        

      
      - **addLearnMoreLink** *(boolean) --* 

        When true, includes a "learn more" link in the template body.

        

      
      - **addSecurityRecommendation** *(boolean) --* 

        When true, includes security recommendations in the template body.

        

      
      - **addTrackPackageLink** *(boolean) --* 

        When true, includes a package tracking link in the template body.

        

      
      - **codeExpirationMinutes** *(integer) --* 

        The number of minutes until a verification code or OTP expires.

        

      
    
  
  :type id: string
  :param id: **[REQUIRED]** 

    The ID of the WhatsApp Business Account to associate with this template.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'metaTemplateId': 'string',
          'templateStatus': 'string',
          'category': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **metaTemplateId** *(string) --* 

        The numeric ID assigned to the template by Meta.

        
      

      - **templateStatus** *(string) --* 

        The status of the created template (for example, PENDING or APPROVED).

        
      

      - **category** *(string) --* 

        The category of the template (for example, UTILITY or MARKETING).

        
  
  **Exceptions**
  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ValidationException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.InvalidParametersException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ThrottledRequestException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.InternalServiceException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.DependencyException`

  