Reputation: 61
{
"error": {
"message": "(#132001) Template name does not exist in the translation",
"type": "OAuthException",
"code": 132001,
"error_data": {
"messaging_product": "whatsapp",
"details": "template name (message_request) does not exist in en_US"
},
"fbtrace_id": "A_EjJh2lU36b3yKxpX9q8WD"
}
}
We have successfully created a message template having 2 buttons in WhatsApp manager under meta business settings.
Name of the template: message_request
Language: English (US)
Status: Active – Quality pending
While trying the graph API to send message to user, we get error.
Request:
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "913456666661",
"type": "template",
"template": {
"name": "message_request",
"language": {
"code": "en_US"
}
}
}
Response:
{
"error": {
"message": "(#132001) Template name does not exist in the translation",
"type": "OAuthException",
"code": 132001,
"error_data": {
"messaging_product": "whatsapp",
"details": "template name (message_request) does not exist in en_US"
},
"fbtrace_id": "A_EjJh2lU36b3yKxpX9q8WD"
}
}
What is causing this issue?
Upvotes: 3
Views: 1681
Reputation: 199
For anyone else having this issue. It might actually be as simple as the error explains. That the template does not really exist in that translation. When I first encountered this error I also believed my settings we're correct. I created the template for a number and submitted it for review without explicitly defining the language.
To be completely sure that your template exists in that translation, query this endpoint:
https://graph.facebook.com/v21.0/{business_account_id}/message_templates
NOTE: Replace business_account_id with your whatsapp business account (WABA) id
This endpoint will return all your existing templates. It requires authentication. So, pass your access token as a Bearer like so:
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {access_token}"
}
Once this query is successful. You will receive a response similar to this:
{
"data": [
{
"name": "user_invite",
"parameter_format": "NAMED",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "You have an invite!"
},
{
"type": "BODY",
"text": "Dear *{{username}}*,\n\n...",
"example": {
"body_text_named_params": [
{
"param_name": "username",
"example": "John Doe"
}
]
}
}
],
"language": "en",
"status": "APPROVED",
"category": "MARKETING",
"sub_category": "CUSTOM",
"id": "924166159864316"
}
],
"paging": {
"cursors": {
"before": "MAZDZD",
"after": "MjQZD"
}
}
}
NOTE: This is my sample response.
If you look clearly, you'll realize my custom template's translation isn't set to en_US rather it is set to en
Upvotes: 0
Reputation: 1
I've went through this error. I was creating the template in a whatsapp phone number account and trying to use it from another one.
Make sure that You've craeted the template in the Same whatsapp account number you are using.
Open the templates page :
Choose the account you want to send messages through. and start creating it from this step. enter image description here
Upvotes: 0
Reputation: 256
Ensure that the language code specified in the API call (en_US in this case) matches the language you set for the template in the WhatsApp manager. Sometimes it takes time for the template to propagate through the system. If you've recently created or modified the template, consider waiting a bit longer. Is the template fully approved and active? When I was working through an ISP partner, I had this error a lot. I contacted their support, they forced synchronization of the template with FB Templates.
Upvotes: 1