{"componentChunkName":"component---src-templates-docs-js","path":"/whatsapp/calling_api/call_permissions","result":{"data":{"site":{"siteMetadata":{"title":"broadcaster","docsLocation":"https://github.com","docsLocationType":"github","editable":false}},"mdx":{"fields":{"id":"1c5c122e-c6b9-595d-a5e0-643e0f2ddc3d","title":"User call permissions","slug":"/whatsapp/calling_api/call_permissions"},"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"User call permissions\",\n  \"order\": 1\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Integration summary\")), mdx(\"ul\", {\n    parentName: \"blockquote\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Token:\"), \" depends on the endpoint, in the \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"Authorization: Bearer <token>\"), \" header \\u2014 use \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"{{wa-msg-api-token}}\"), \" for messaging and \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"{{admin-token}}\"), \" for template creation (\", mdx(\"a\", {\n    href: \"/whatsapp/authentication_token\"\n  }, \"how to generate it\"), \")\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Endpoints used on this page:\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"POST https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging\"), \" (messaging token \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"{{wa-msg-api-token}}\"), \"): send the non-template message or the template message\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"POST https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/template\"), \" (admin token \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"{{admin-token}}\"), \"): create the template\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"strong\"\n  }, \"type\"), \" values on this page:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"\\\"interactive\\\"\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"\\\"template\\\"\")))), mdx(\"p\", null, \"There are three ways to ask a user for permission to call them: with a non-template message, or by creating a template with the request and sending it as a template message.\"), mdx(\"section\", {\n    \"id\": \"sendanon-templatemessagewithacallpermissionrequest\"\n  }, mdx(\"h2\", {\n    parentName: \"section\"\n  }, \"Send a non-template message with a call permission request\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"To send a non-template message with a call permission request, use the\"), mdx(\"a\", {\n    href: \"/whatsapp/messaging/without_template/call_permission_request#h-sendcallpermissionrequest\"\n  }, \"/messaging\"), \" endpoint.\", mdx(\"br\", null), mdx(\"hr\", {\n    parentName: \"section\"\n  })), mdx(\"section\", {\n    \"id\": \"createatemplatewithacallpermissionrequest\"\n  }, mdx(\"h2\", {\n    parentName: \"section\"\n  }, \"Create a template with a call permission request\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"To create a template with a call permission request, use the \", mdx(\"a\", {\n    href: \"/whatsapp/administration/template_management/create#h-createtemplate\"\n  }, \" /template \"), \" endpoint and add\\nthe following to the structure object.\")), mdx(\"section\", {\n    \"id\": \"createatemplatewithacallpermissionrequest--body\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"Body\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"Fields for \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Create a template with a call permission request\"), \", inside the structure object:\")), mdx(\"section\", {\n    \"id\": \"createatemplatewithacallpermissionrequest--body--structureobject\"\n  }, mdx(\"h4\", {\n    parentName: \"section\"\n  }, \"Structure object\"), mdx(\"table\", {\n    parentName: \"section\"\n  }, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Name\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Description\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Requirements\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"call_permission_request\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Send \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"true\"), \" to add the call-permission-request button to the template.\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Boolean\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Optional\"))))), mdx(\"section\", {\n    \"id\": \"createatemplatewithacallpermissionrequest--example\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"Example\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"Complete \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Create a template with a call permission request\"), \" example. This works for both MARKETING and UTILITY templates; change \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"category\"), \" and the body text accordingly.\")), mdx(\"section\", {\n    \"id\": \"createatemplatewithacallpermissionrequest--example--httprequest\"\n  }, mdx(\"h4\", {\n    parentName: \"section\"\n  }, \"HTTP request\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/template' \\\\\\n-H 'Authorization: Bearer {{admin-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-d '{\\n    \\\"wba_id\\\": \\\"1234567899870\\\",\\n    \\\"name\\\": \\\"utility_call_permission_request\\\",\\n    \\\"language\\\": \\\"en_US\\\",\\n    \\\"category\\\": \\\"UTILITY\\\",\\n    \\\"structure\\\": {\\n        \\\"body\\\": {\\n            \\\"text\\\": \\\"Hi {{1}}, we would like to call you to assist with your recent order. Our support team is ready to help.\\\",\\n            \\\"example\\\": {\\n                \\\"body_text\\\": [\\n                    [\\n                        \\\"Pablo\\\"\\n                    ]\\n                ]\\n            }\\n        },\\n        \\\"call_permission_request\\\": true\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"createatemplatewithacallpermissionrequest--example--body\"\n  }, mdx(\"h4\", {\n    parentName: \"section\"\n  }, \"Body\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-json\"\n  }, \"{\\n    \\\"wba_id\\\": \\\"1234567899870\\\",\\n    \\\"name\\\": \\\"utility_call_permission_request\\\",\\n    \\\"language\\\": \\\"en_US\\\",\\n    \\\"category\\\": \\\"UTILITY\\\",\\n    \\\"structure\\\": {\\n        \\\"body\\\": {\\n            \\\"text\\\": \\\"Hi {{1}}, we would like to call you to assist with your recent order. Our support team is ready to help.\\\",\\n            \\\"example\\\": {\\n                \\\"body_text\\\": [\\n                    [\\n                        \\\"Pablo\\\"\\n                    ]\\n                ]\\n            }\\n        },\\n        \\\"call_permission_request\\\": true\\n    }\\n}\\n\")), mdx(\"br\", null), mdx(\"hr\", {\n    parentName: \"section\"\n  })), mdx(\"section\", {\n    \"id\": \"sendatemplatemessagewithacallpermissionrequest\"\n  }, mdx(\"h2\", {\n    parentName: \"section\"\n  }, \"Send a template message with a call permission request\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"To send a message using the call permission request template, use the\"), mdx(\"a\", {\n    href: \"/whatsapp/messaging/http\"\n  }, \" /messaging \"), \" endpoint and specify the template you created.\", mdx(\"br\", null), mdx(\"hr\", {\n    parentName: \"section\"\n  })));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#send-a-non-template-message-with-a-call-permission-request","title":"Send a non-template message with a call permission request"},{"url":"#create-a-template-with-a-call-permission-request","title":"Create a template with a call permission request","items":[{"url":"#body","title":"Body","items":[{"url":"#structure-object","title":"Structure object"}]},{"url":"#example","title":"Example","items":[{"url":"#http-request","title":"HTTP request"},{"url":"#body-1","title":"Body"}]}]},{"url":"#send-a-template-message-with-a-call-permission-request","title":"Send a template message with a call permission request"}]},"timeToRead":1,"parent":{"__typename":"File","relativePath":"whatsapp/calling_api/call_permissions.md","fields":{"gitLogLatestAuthorName":"Irais Aguirre","gitLogLatestAuthorEmail":"irais.aguirre@conceptomovil.com","gitLogLatestDate":"5 hours ago"}},"frontmatter":{"metaTitle":null,"showMetadata":null,"editable":null,"showPreviousNext":null,"showToc":null}},"gitBranch":{"name":"20211019-2FACTOR_AUTH"},"gitCommit":{"hash":"9713e1925aeb8cad930f91b6bf05d0b5937b2bb5","date":"2026-11-13 06:39"}},"pageContext":{"id":"1c5c122e-c6b9-595d-a5e0-643e0f2ddc3d"}},"staticQueryHashes":["12478684","12478684","2882937274","2882937274","353167761","353167761"]}