{"componentChunkName":"component---src-templates-docs-js","path":"/api-externa/sms/api-http/integration_tips","result":{"data":{"site":{"siteMetadata":{"title":"broadcaster","docsLocation":"https://github.com","docsLocationType":"github","editable":false}},"mdx":{"fields":{"id":"4d93f5f7-6d33-5188-b95c-65649c897994","title":"Recomendaciones e integración","slug":"/api-externa/sms/api-http/integration_tips"},"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\": \"Recomendaciones e integración\",\n  \"order\": 4\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(\"section\", null, mdx(\"h2\", {\n    parentName: \"section\"\n  }, \"Recomendaciones de integraci\\xF3n\"), mdx(\"ul\", null, mdx(\"li\", null, mdx(\"b\", null, \"Cachear el token:\"), \" cachea el token y reutil\\xEDzalo durante los ~10 minutos de vida. No pidas uno nuevo por cada env\\xEDo.\"), mdx(\"li\", null, mdx(\"b\", null, \"Maneja el 401:\"), \" si el token venci\\xF3, solicita uno nuevo y reintenta la petici\\xF3n una vez.\"), mdx(\"li\", null, mdx(\"b\", null, \"Maneja el 500 con reintentos:\"), \" usa backoff exponencial (ej. 1s, 2s, 4s) con un m\\xE1ximo de 3 intentos.\"), mdx(\"li\", null, mdx(\"b\", null, \"Guarda el mailingId:\"), \" guarda el \", mdx(\"code\", null, \"mailingId\"), \" de cada env\\xEDo exitoso \\u2014 es el identificador \\xFAnico para rastrear o reportar el mensaje.\"), mdx(\"li\", null, mdx(\"b\", null, \"No expongas el Secret:\"), \" no lo publiques en c\\xF3digo fuente, logs ni variables de entorno del front-end. Cons\\xE9rvalo del lado del servidor.\"), mdx(\"li\", null, mdx(\"b\", null, \"Env\\xEDa country siempre:\"), \" mejora la velocidad de resoluci\\xF3n del operador y reduce errores \", mdx(\"code\", null, \"-40\"), \".\")), mdx(\"br\", null)), mdx(\"section\", null, mdx(\"h2\", {\n    parentName: \"section\"\n  }, \"Preguntas Frecuentes\"), mdx(\"b\", null, \"\\xBFEl token que uso para enviar SMS es el mismo que para gestionar llaves en el portal?\"), mdx(\"br\", null), \"No. El token para el portal es un token de usuario (realm `broadcaster`). El token para enviar SMS es un token de m\\xE1quina (realm `broadcaster-api-external`) que obtienes con el flujo `client_credentials` y tu llave de API.\", mdx(\"br\", null), mdx(\"br\", null), mdx(\"b\", null, \"\\xBFPuedo enviar el mismo mensaje a varios n\\xFAmeros al mismo tiempo?\"), mdx(\"br\", null), \"Este endpoint acepta un n\\xFAmero de destino por llamada (`msisdn` es un solo n\\xFAmero). Para env\\xEDos masivos, realiza m\\xFAltiples llamadas o consulta a tu ejecutivo de cuenta sobre el flujo de campa\\xF1as.\", mdx(\"br\", null), mdx(\"br\", null), mdx(\"b\", null, \"\\xBFC\\xF3mo s\\xE9 si el SMS lleg\\xF3 al destinatario?\"), mdx(\"br\", null), \"Activa el DLR (ver [Acuse de Entrega (DLR)](/api-externa/sms/api-http/http#acuse-de-entrega-dlr)). La notificaci\\xF3n llega al webhook o cola configurada en tu cuenta. Si no tienes configurado un receptor, consulta a soporte.\", mdx(\"br\", null), mdx(\"br\", null), mdx(\"b\", null, \"\\xBFQu\\xE9 pasa si mi token vence a la mitad de una r\\xE1faga de env\\xEDos?\"), mdx(\"br\", null), \"Recibir\\xE1s un 401 del servidor. Solicita un token nuevo ([Paso 1](/api-externa/sms/api-http/authentication)) y reintenta los mensajes que fallaron.\", mdx(\"br\", null), mdx(\"br\", null), mdx(\"b\", null, \"\\xBFHay l\\xEDmite de mensajes por segundo?\"), mdx(\"br\", null), \"Depende de la configuraci\\xF3n de tu cuenta. Si recibes errores `-109` (balance limit reached) o tiempos de respuesta altos, consulta con tu ejecutivo de cuenta.\", mdx(\"br\", null), mdx(\"br\", null), mdx(\"b\", null, \"\\xBFC\\xF3mo reporto un error o problema t\\xE9cnico?\"), mdx(\"br\", null), \"Contacta al equipo de soporte con: el `mailingId` (si lo tienes), el body del request (sin el secret), la respuesta recibida y la fecha/hora del intento.\"));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#recomendaciones-de-integración","title":"Recomendaciones de integración"},{"url":"#preguntas-frecuentes","title":"Preguntas Frecuentes"}]},"timeToRead":1,"parent":{"__typename":"File","relativePath":"api-externa/sms/api-http/integration_tips.md","fields":{"gitLogLatestAuthorName":"Yered Rios","gitLogLatestAuthorEmail":"yered.rios@conceptomovil.com","gitLogLatestDate":"2 months ago"}},"frontmatter":{"metaTitle":null,"showMetadata":null,"editable":null,"showPreviousNext":null,"showToc":null}},"gitBranch":{"name":"DEV"},"gitCommit":{"hash":"653d4d48e7c023d6d0792f6d3212f540ef8d669e","date":"2026-09-01 04:50"}},"pageContext":{"id":"4d93f5f7-6d33-5188-b95c-65649c897994"}},"staticQueryHashes":["12478684","12478684","2882937274","2882937274","353167761","353167761"]}