{"componentChunkName":"component---src-templates-docs-js","path":"/api-externa/sms/api-http/authentication","result":{"data":{"site":{"siteMetadata":{"title":"broadcaster","docsLocation":"https://github.com","docsLocationType":"github","editable":false}},"mdx":{"fields":{"id":"28cd450d-b26c-5955-9a6d-a617cb466828","title":"Step 1 - Get the Token","slug":"/api-externa/sms/api-http/authentication"},"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\": \"Step 1 - Get the Token\",\n  \"order\": 1\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 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, \"Make a \", mdx(\"b\", null, \"POST\"), \" to the following Keycloak endpoint with your API credentials:\"), mdx(\"br\", null), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"URL\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"https://sso2.broadcastermobile.com/realms/broadcaster-api-external/protocol/openid-connect/token\"))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"METHOD\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"POST\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"HEADERS\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Content-Type: application/x-www-form-urlencoded\")))), mdx(\"br\", null), mdx(\"section\", {\n    \"id\": \"body\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"Body\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"grant_type=client_credentials\\nclient_id=<YOUR_CLIENT_ID>\\nclient_secret=<YOUR_SECRET>\\n\")), mdx(\"br\", null), 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  }, \"Parameters\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Description\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Required\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"grant_type\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Must always be sent as \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"client_credentials\"), \".\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Yes\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"client_id\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Identifier of the API key assigned to your account.\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Yes\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"client_secret\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Secret associated with the \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"client_id\"), \".\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Yes\")))), mdx(\"br\", null)), mdx(\"section\", {\n    \"id\": \"successfulresponse\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"Successful response\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-json\"\n  }, \"{\\n  \\\"access_token\\\": \\\"eyJhbGci...\\\",\\n  \\\"expires_in\\\": 600,\\n  \\\"token_type\\\": \\\"Bearer\\\"\\n}\\n\")), mdx(\"br\", null), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"Store the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"access_token\"), \" value. It is valid for 10 minutes (\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"expires_in\"), \" in seconds).\"), mdx(Info, {\n    mdxType: \"Info\"\n  }, mdx(\"p\", {\n    parentName: \"section\"\n  }, \"The portal token is a user token (realm \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"broadcaster\"), \"). The token to send SMS is a machine token (realm \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"broadcaster-api-external\"), \") that you obtain with the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"client_credentials\"), \" flow and your API key. They are not interchangeable.\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#body","title":"Body"},{"url":"#successful-response","title":"Successful response"}]},"timeToRead":1,"parent":{"__typename":"File","relativePath":"api-externa/sms/api-http/authentication.md","fields":{"gitLogLatestAuthorName":"Irais Aguirre","gitLogLatestAuthorEmail":"irais.aguirre@conceptomovil.com","gitLogLatestDate":"7 days 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":"28cd450d-b26c-5955-9a6d-a617cb466828"}},"staticQueryHashes":["12478684","12478684","2882937274","2882937274","353167761","353167761"]}