{"componentChunkName":"component---src-templates-docs-js","path":"/whatsapp/authentication_token","result":{"data":{"site":{"siteMetadata":{"title":"broadcaster","docsLocation":"https://github.com","docsLocationType":"github","editable":false}},"mdx":{"fields":{"id":"72a20f5e-96ec-5151-a7ef-66e257b42563","title":"Generate authentication token","slug":"/whatsapp/authentication_token"},"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\": \"Generate authentication token\",\n  \"order\": 2\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Warning = makeShortcode(\"Warning\");\nvar Info = makeShortcode(\"Info\");\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(\"p\", null, \"Requests to the WhatsApp API are authenticated with a bearer token. There are two kinds of token, and each one only works with its own endpoints:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Admin token:\"), \" use it for every endpoint whose path contains \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"whatsapp-bsp-admin-ext-endpoint-ws\"), \". In the examples it is the \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"{{admin-token}}\"), \" placeholder.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Messaging token:\"), \" use it for every other endpoint in this documentation, whose path contains \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"whatsapp-bsp-api-endpoint-ws\"), \". In the examples it is the \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"{{wa-msg-api-token}}\"), \" placeholder.\")), mdx(Warning, {\n    mdxType: \"Warning\"\n  }, mdx(\"p\", null, \"An admin token doesn't work on messaging endpoints, and a messaging token doesn't work on admin endpoints. Check the endpoint's path to know which one to use.\")), mdx(\"p\", null, \"You generate both tokens with your Api-Key and Api-Token, provided by Concepto M\\xF3vil.\"), mdx(Info, {\n    mdxType: \"Info\"\n  }, mdx(\"p\", null, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{{url}}\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{{url_token_admin}}\"), \" are placeholders for the production hosts. Concepto M\\xF3vil gives you their values together with your Api-Key and Api-Token. They are two different hosts: use \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{{url}}\"), \" for the Messaging token and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{{url_token_admin}}\"), \" for the Admin token. These values are not public; don't try to infer them.\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Messaging token:\"), \" valid for 24 hours.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Admin token:\"), \" valid for 15 minutes.\")), mdx(\"p\", null, \"If you request a token while the previous one is still valid, the service returns the same token, and its validity still counts from when it was first generated. Once it expires, request a new one.\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Token\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Sections that use it\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Admin\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"ul\", null, mdx(\"li\", null, \"Template management\"), mdx(\"li\", null, \"WhatsApp Flows\"), mdx(\"li\", null, \"Groups (group management)\"), mdx(\"li\", null, \"Block users\"), mdx(\"li\", null, \"Update profile and logo\"), mdx(\"li\", null, \"Call settings\"), mdx(\"li\", null, \"Payment templates (Payments Brasil)\"), mdx(\"li\", null, \"Quality monitoring\"), mdx(\"li\", null, \"C-Commerce (catalogs)\")))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Messaging\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"ul\", null, mdx(\"li\", null, \"Non-template messages\"), mdx(\"li\", null, \"Template messages\"), mdx(\"li\", null, \"Interactive messages\"), mdx(\"li\", null, \"C-Commerce (product messages)\"), mdx(\"li\", null, \"Payments Brasil (sending messages)\"), mdx(\"li\", null, \"Groups (sending messages)\"), mdx(\"li\", null, \"Business operations during a call\"), mdx(\"li\", null, \"Read and typing indicators\"), mdx(\"li\", null, \"File download\")))))), mdx(\"section\", {\n    \"id\": \"related\"\n  }, mdx(\"h2\", {\n    parentName: \"section\"\n  }, \"Related\"), mdx(\"ul\", {\n    parentName: \"section\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    href: \"/whatsapp/authentication_token/http\"\n  }, \"HTTP connection\"), \": endpoints, method and required headers.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    href: \"/whatsapp/authentication_token/response\"\n  }, \"Response\"), \": response fields and examples.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    href: \"/whatsapp/authentication_token/examples\"\n  }, \"Examples\"), \": curl requests.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    href: \"/whatsapp/error_codes\"\n  }, \"Error codes\"), \": includes token errors 3000\\u20133015.\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#related","title":"Related"}]},"timeToRead":1,"parent":{"__typename":"File","relativePath":"whatsapp/authentication_token.md","fields":{"gitLogLatestAuthorName":"Irais Aguirre","gitLogLatestAuthorEmail":"irais.aguirre@conceptomovil.com","gitLogLatestDate":"6 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":"72a20f5e-96ec-5151-a7ef-66e257b42563"}},"staticQueryHashes":["12478684","12478684","2882937274","2882937274","353167761","353167761"]}