{"componentChunkName":"component---src-templates-docs-js","path":"/whatsapp/messaging/interactive/location_request","result":{"data":{"site":{"siteMetadata":{"title":"broadcaster","docsLocation":"https://github.com","docsLocationType":"github","editable":false}},"mdx":{"fields":{"id":"b885ac5b-3b6e-5e14-8c60-4dd1ce2ef536","title":"Location request","slug":"/whatsapp/messaging/interactive/location_request"},"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\": \"Location request\",\n  \"order\": 6\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  }, \"Endpoint:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"POST https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Token:\"), \" messaging token, in the \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"Authorization: Bearer {{wa-msg-api-token}}\"), \" header (\", mdx(\"a\", {\n    href: \"/whatsapp/authentication_token\"\n  }, \"how to generate it\"), \")\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Common fields:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"from\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"to\"), \" (phone number or BSUID) and \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"type\"), \" (\", mdx(\"a\", {\n    href: \"/whatsapp/messaging/http#h-commonfields\"\n  }, \"details\"), \")\"), 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(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Response:\"), \" the same for every message (\", mdx(\"a\", {\n    href: \"/whatsapp/messaging/http#h-response\"\n  }, \"see response\"), \")\"))), mdx(\"p\", null, \"Messages with a button that asks the user to share their location. They are sent with \", mdx(\"a\", {\n    href: \"/whatsapp/messaging/http\"\n  }, \"POST /v1/messaging\"), \"; headers, common fields and the response are in \", mdx(\"a\", {\n    href: \"/whatsapp/messaging/http\"\n  }, \"HTTP connection\"), \".\"), mdx(\"section\", {\n    \"id\": \"locationrequest\"\n  }, mdx(\"h2\", {\n    parentName: \"section\"\n  }, \"Location request\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"type\"), \" field must be \\\"interactive\\\" and the message content is sent in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"send_location_request\"), \" object. See the \", mdx(\"a\", {\n    href: \"/whatsapp/messaging/interactive#h-generalstructure\"\n  }, \"general structure\"), \" of interactive messages.\")), mdx(\"section\", {\n    \"id\": \"locationrequest--body\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"Body\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"Fields for \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Location request\"), \":\"), 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  }, \"send_location_request\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Object for asking the user to share their location.\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Object\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Required if you're sending a location request.\"))))), mdx(\"section\", {\n    \"id\": \"locationrequest--body--sendlocationrequestobject\"\n  }, mdx(\"h4\", {\n    parentName: \"section\"\n  }, \"Send location request 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  }, \"body\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Message text that accompanies the request for the user to share their location.\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"String\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Required.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"action.name\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Must be \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"\\\"send_location\\\"\"), \".\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"String\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Optional.\"))))), mdx(\"section\", {\n    \"id\": \"locationrequest--example\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"Example\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"Complete \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Location request\"), \" example (HTTP request and JSON body):\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\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-api-endpoint-ws/services/v1/messaging' \\\\\\n-H 'Authorization: Bearer {{wa-msg-api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-d '{\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"type\\\": \\\"interactive\\\",\\n    \\\"send_location_request\\\": {\\n        \\\"body\\\": \\\"Please share your location to continue with the service.\\\",\\n        \\\"action\\\": {\\n            \\\"name\\\": \\\"send_location\\\"\\n        }\\n    }\\n}'\\n\")), mdx(\"p\", {\n    parentName: \"section\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Body\")), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-json\"\n  }, \"{\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"type\\\": \\\"interactive\\\",\\n    \\\"send_location_request\\\": {\\n        \\\"body\\\": \\\"Please share your location to continue with the service.\\\",\\n        \\\"action\\\": {\\n            \\\"name\\\": \\\"send_location\\\"\\n        }\\n    }\\n}\\n\")), mdx(\"br\", null), mdx(\"hr\", {\n    parentName: \"section\"\n  })));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#location-request","title":"Location request","items":[{"url":"#body","title":"Body","items":[{"url":"#send-location-request-object","title":"Send location request object"}]},{"url":"#example","title":"Example"}]}]},"timeToRead":1,"parent":{"__typename":"File","relativePath":"whatsapp/messaging/interactive/location_request.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":"b885ac5b-3b6e-5e14-8c60-4dd1ce2ef536"}},"staticQueryHashes":["12478684","12478684","2882937274","2882937274","353167761","353167761"]}