{"componentChunkName":"component---src-templates-docs-js","path":"/api-externa/sms/api-http","result":{"data":{"site":{"siteMetadata":{"title":"broadcaster","docsLocation":"https://github.com","docsLocationType":"github","editable":false}},"mdx":{"fields":{"id":"669ceebb-a960-51cf-9c17-2b166494e8a2","title":"HTTP API","slug":"/api-externa/sms/api-http"},"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\": \"HTTP API\",\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 Tip = makeShortcode(\"Tip\");\nvar Warning = makeShortcode(\"Warning\");\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(\"br\", null), mdx(\"p\", null, \"The \", mdx(\"b\", null, \"External SMS HTTP API\"), \" lets you integrate SMS sending into your system using a standard \", mdx(\"b\", null, \"OAuth2 (client_credentials)\"), \" authentication flow against Keycloak, followed by a REST call to the messaging endpoint.\"), mdx(\"br\", null), mdx(\"p\", null, \"Your system always performs two operations: first it obtains a temporary token with your API key, then it uses that token to send the SMS. The token is valid for approximately 10 minutes, so you can reuse it for multiple sends.\"), mdx(\"br\", null), mdx(\"section\", {\n    \"id\": \"generalflow\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"General flow\"), 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  }, \"Step\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Source\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Target\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Action\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"1\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Your system\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Keycloak\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"POST /token\"), \" (client_id + client_secret)\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"2\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Keycloak\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Your system\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Returns \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"access_token\"), \" (valid ~10 min)\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"3\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Your system\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Messaging API\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"POST /services/messaging\"), \" (Bearer access_token)\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"4\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Messaging API\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Your system\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Returns \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"code\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"mailingId\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"result\"))))), mdx(Tip, {\n    mdxType: \"Tip\"\n  }, mdx(\"p\", {\n    parentName: \"section\"\n  }, \"Cache the token in memory and request a new one when it is about to expire. Do not request it again for every send \\u2014 it slows down your integration unnecessarily.\")), mdx(Warning, {\n    mdxType: \"Warning\"\n  }, mdx(\"p\", {\n    parentName: \"section\"\n  }, \"Before you start, you need an API key (Client ID + Secret). If you do not have one yet, ask your account administrator to generate it from the portal.\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#general-flow","title":"General flow"}]},"timeToRead":1,"parent":{"__typename":"File","relativePath":"api-externa/sms/api-http.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":"669ceebb-a960-51cf-9c17-2b166494e8a2"}},"staticQueryHashes":["12478684","12478684","2882937274","2882937274","353167761","353167761"]}