{"id":19943,"date":"2026-11-19T01:55:36","date_gmt":"2026-11-18T20:25:36","guid":{"rendered":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/"},"modified":"2026-11-19T02:05:54","modified_gmt":"2026-11-18T20:35:54","slug":"sms-api-cors-error-browser","status":"publish","type":"post","link":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/","title":{"rendered":"SMS API CORS error in the browser: keep the API key on your server"},"content":{"rendered":"<p>If you see a CORS error when you call the SMS API from JavaScript in a web page, the fix is not a browser setting. Move the call to your server. Any API key you put in browser code can be read by every visitor, who can then send SMS from your wallet. Your page should call your own server, and your server calls the Fast2SMS API with the key kept secret.<\/p>\n<p>This guide explains what the CORS error means, why calling the API from the browser is unsafe even when it seems to work, and how to set up a small server endpoint.<\/p>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Send SMS safely from your website<\/strong><p>Keep your Fast2SMS API key on your server and call it from your own backend endpoint.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>What a CORS error means<\/h2>\n<p>CORS (cross-origin resource sharing) is a browser rule. When a page on one domain calls an API on another domain, the browser checks the API&#8217;s reply headers before it lets your JavaScript read the reply. If the check fails, the console shows a CORS error. Before some requests, for example a POST with an <code>authorization<\/code> header or a JSON body, the browser first sends a check request (a preflight). If that check gets a redirect or an error, the real request is never sent.<\/p>\n<div class=\"f2s-note f2s-note--warn\">\n<p><strong>A CORS error does not always mean nothing was sent.<\/strong> A simple GET request, such as a URL with the key and message in the query string, can reach the server and send the SMS. The browser then only blocks your code from reading the reply. If your code retries because it saw an error, the customer can get the SMS twice.<\/p>\n<\/div>\n<h2>Why the API key must not be in the browser<\/h2>\n<ul>\n<li>Anyone can open the page source or the browser&#8217;s network tab and copy the key.<\/li>\n<li>With the key, they can send SMS to any number at your cost, and read your reports.<\/li>\n<li>Bots look for keys in public pages and code. An OTP form that calls the API directly is also open to SMS pumping, where bots trigger thousands of OTPs.<\/li>\n<li>API Security (IP whitelisting) cannot help, because browser calls come from each visitor&#8217;s own IP.<\/li>\n<\/ul>\n<p>So even if a browser call works, do not ship it. If a key was ever in a public page or app, reset it. See <a href=\"\/help\/api-key-find-reset\/\">how to find and reset your API key<\/a>.<\/p>\n<h2>The right setup: page, then your server, then Fast2SMS<\/h2>\n<ol class=\"f2s-steps\">\n<li>\n<h3>Keep the key on the server<\/h3>\n<p>Copy your key from <strong>Account Setting<\/strong> &gt; <strong>API Key<\/strong> and store it as an environment variable or secret on your server or serverless platform. Never commit it to code that ships to browsers or mobile apps.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-hd-33-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"API Key page with a masked Authorization Key, View and Reset buttons, and the API Access switch\"><figcaption>The key belongs in your server&#8217;s settings, not in page code.<\/figcaption><\/figure>\n<\/li>\n<li>\n<h3>Create one endpoint on your server<\/h3>\n<p>Your endpoint accepts only what the page needs (for example an order ID or a phone number), decides which template and values to use, and calls Fast2SMS. A Node.js (Express) example:<\/p>\n<pre><code class=\"language-javascript\">app.post(\"\/api\/send-order-sms\", async (req, res) =&gt; {\n  \/\/ Check the user is logged in and the order belongs to them first\n  const order = await getOrder(req.body.orderId, req.user);\n  const r = await fetch(\"https:\/\/www.fast2sms.com\/dev\/bulkV2\", {\n    method: \"POST\",\n    headers: {\n      \"authorization\": process.env.FAST2SMS_API_KEY,\n      \"Content-Type\": \"application\/json\"\n    },\n    body: JSON.stringify({\n      route: \"dlt\",\n      sender_id: \"DEMOTR\",\n      message: \"10001\",\n      variables_values: [order.name, order.id, order.amount, order.date].join(\"|\"),\n      numbers: order.mobile\n    })\n  });\n  const data = await r.json();\n  res.json({ ok: data.return === true });\n});<\/code><\/pre>\n<p>Do not let the page send the message text, template or number list freely. Otherwise anyone can use your endpoint to send their own SMS.<\/p>\n<\/li>\n<li>\n<h3>Call your endpoint from the page<\/h3>\n<pre><code class=\"language-javascript\">await fetch(\"\/api\/send-order-sms\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\/json\" },\n  body: JSON.stringify({ orderId: \"DT10458\" })\n});<\/code><\/pre>\n<p>The page and the endpoint are on the same domain, so there is no CORS check. If your front end and backend are on different domains, add CORS headers on your own backend for your front-end domain only.<\/p>\n<\/li>\n<li>\n<h3>Check the calls<\/h3>\n<p>Open <strong>Account Setting<\/strong> &gt; <strong>API Logs<\/strong>. Every call should now come from your server&#8217;s IP. Once that is true, you can turn on API Security and whitelist that IP.<\/p>\n<\/li>\n<\/ol>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Lock your API key to your server<\/strong><p>Turn on API Security in Fast2SMS so only your server&#039;s IP can use your key.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>Other causes of a CORS error<\/h2>\n<div class=\"f2s-facts\">\n<table>\n<thead>\n<tr>\n<th>Cause<\/th>\n<th>Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>The URL has no www, or uses http<\/td>\n<td>Fast2SMS redirects those to https:\/\/www.fast2sms.com, and a browser preflight fails on a redirect. Use the full address https:\/\/www.fast2sms.com, from your server.<\/td>\n<\/tr>\n<tr>\n<td>Your own backend does not send CORS headers<\/td>\n<td>If your front end is on a different domain from your backend, allow that front-end domain in your backend&#8217;s CORS settings.<\/td>\n<\/tr>\n<tr>\n<td>A hosting or security layer in front of your backend blocks OPTIONS requests<\/td>\n<td>Allow OPTIONS for your endpoint, or serve the page and endpoint from the same domain.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>Adding OTP to a website?<\/h2>\n<p>The Fast2SMS OTP widget follows the same pattern: the widget runs in your page and talks only to a small backend kit, which holds the API key and calls Fast2SMS. See <a href=\"\/help\/otp-verification-widget-fast2sms\/\">OTP verification widget<\/a>. For mobile apps, the same rule applies as for web pages: keep the key on your server, as shown in <a href=\"\/help\/flutter-otp-sms-api\/\">Flutter OTP verification with Fast2SMS<\/a>.<\/p>\n<section class=\"f2s-faq\">\n<h2>Frequently asked questions<\/h2>\n<h3>Why do I get a CORS error when calling the SMS API from JavaScript?<\/h3>\n<p>The browser blocked the cross-domain call or its check request. Do not work around it in the browser. Call the API from your server instead.<\/p>\n<h3>Can I call the Fast2SMS API directly from React, Vue or plain JavaScript?<\/h3>\n<p>Not safely. Your API key would be visible to every visitor. Call your own backend endpoint, which calls Fast2SMS.<\/p>\n<h3>Was my SMS sent even though I saw a CORS error?<\/h3>\n<p>Possibly. A simple GET request can reach the server even when the browser blocks the reply. Check <a href=\"\/help\/api-logs-fast2sms\/\">API Logs<\/a> and the delivery report before you retry.<\/p>\n<h3>Can I use a public CORS proxy?<\/h3>\n<p>No. Your API key would pass through someone else&#8217;s server. Use your own backend or serverless function.<\/p>\n<h3>My key was in my website code. What now?<\/h3>\n<p>Reset the key on the API Key page, update it on your server, and check API Logs and API Security for IPs you do not know.<\/p>\n<h3>Does a serverless function count as a server?<\/h3>\n<p>Yes. A function on your hosting platform can keep the key as a secret and call the API. If you want to use API Security, the function needs a fixed outgoing IP.<\/p>\n<\/section>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Build it the safe way<\/strong><p>Create your Fast2SMS account and send SMS from your backend with your own DLT templates.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>Related guides<\/h2>\n<ul>\n<li><a href=\"\/help\/api-security-ip-whitelist\/\">How to whitelist IP addresses for the Fast2SMS API<\/a><\/li>\n<li><a href=\"\/help\/api-key-find-reset\/\">How to find, view and reset your Fast2SMS API key<\/a><\/li>\n<li><a href=\"\/help\/send-sms-from-website-form\/\">Send an SMS when someone fills your website form<\/a><\/li>\n<li><a href=\"\/help\/otp-sms-pumping-fraud-protection\/\">OTP fraud and SMS pumping: how to protect your OTP form<\/a><\/li>\n<li><a href=\"\/help\/dlt-sms-api-guide\/\">Fast2SMS DLT SMS API guide<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>If you see a CORS error when you call the SMS API from JavaScript in a web page, the fix is not a browser setting. Move the call to your server. Any API key you put in browser code can be read by every visitor, who can then send SMS from your wallet. Your page [&hellip;]<\/p>\n","protected":false},"featured_media":19648,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,13],"tags":[],"class_list":["post-19943","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-bulk-sms"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SMS API CORS Error in Browser: Fix It Safely | Fast2SMS<\/title>\n<meta name=\"description\" content=\"Getting a CORS error calling the SMS API from JavaScript? Do not put the API key in the browser. Call Fast2SMS from your server with this simple setup.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SMS API CORS Error in Browser: Fix It Safely | Fast2SMS\" \/>\n<meta property=\"og:description\" content=\"Getting a CORS error calling the SMS API from JavaScript? Do not put the API key in the browser. Call Fast2SMS from your server with this simple setup.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/\" \/>\n<meta property=\"og:site_name\" content=\"Fast2SMS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Fast2SMS\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T20:25:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-18T20:35:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-hd-33-scaled.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fast2sms\" \/>\n<meta name=\"twitter:site\" content=\"@fast2sms\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"headline\":\"SMS API CORS error in the browser: keep the API key on your server\",\"datePublished\":\"2026-11-18T20:25:36+00:00\",\"dateModified\":\"2026-11-18T20:35:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/\"},\"wordCount\":1112,\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/api-key-hd-33-scaled.webp\",\"articleSection\":[\"API\",\"Bulk SMS\"],\"inLanguage\":\"en-IN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/\",\"name\":\"SMS API CORS Error in Browser: Fix It Safely | Fast2SMS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/api-key-hd-33-scaled.webp\",\"datePublished\":\"2026-11-18T20:25:36+00:00\",\"dateModified\":\"2026-11-18T20:35:54+00:00\",\"description\":\"Getting a CORS error calling the SMS API from JavaScript? Do not put the API key in the browser. Call Fast2SMS from your server with this simple setup.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/#breadcrumb\"},\"inLanguage\":\"en-IN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-IN\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/api-key-hd-33-scaled.webp\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/api-key-hd-33-scaled.webp\",\"width\":2560,\"height\":1600,\"caption\":\"API Key page with the masked Authorization Key, View and Reset buttons and the API Access switch turned on\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/sms-api-cors-error-browser\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/api\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SMS API CORS error in the browser: keep the API key on your server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/\",\"name\":\"Fast2SMS\",\"description\":\"Help\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"inLanguage\":\"en-IN\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\",\"name\":\"Fast2SMS\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#logo\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/Fast2SMS.png\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/Fast2SMS.png\",\"caption\":\"Fast2SMS\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#logo\"},\"email\":\"support@fast2sms.com\",\"telephone\":\"+91-6262778822\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Fast2SMS\",\"https:\\\/\\\/www.instagram.com\\\/fast2sms\",\"https:\\\/\\\/x.com\\\/fast2sms\",\"https:\\\/\\\/www.youtube.com\\\/Fast2SMSofficial\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/fast2sms\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SMS API CORS Error in Browser: Fix It Safely | Fast2SMS","description":"Getting a CORS error calling the SMS API from JavaScript? Do not put the API key in the browser. Call Fast2SMS from your server with this simple setup.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/","og_locale":"en_US","og_type":"article","og_title":"SMS API CORS Error in Browser: Fix It Safely | Fast2SMS","og_description":"Getting a CORS error calling the SMS API from JavaScript? Do not put the API key in the browser. Call Fast2SMS from your server with this simple setup.","og_url":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/","og_site_name":"Fast2SMS","article_publisher":"https:\/\/www.facebook.com\/Fast2SMS\/","article_published_time":"2026-11-18T20:25:36+00:00","article_modified_time":"2026-11-18T20:35:54+00:00","og_image":[{"width":2560,"height":1600,"url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-hd-33-scaled.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_creator":"@fast2sms","twitter_site":"@fast2sms","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/#article","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/"},"author":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"headline":"SMS API CORS error in the browser: keep the API key on your server","datePublished":"2026-11-18T20:25:36+00:00","dateModified":"2026-11-18T20:35:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/"},"wordCount":1112,"publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-hd-33-scaled.webp","articleSection":["API","Bulk SMS"],"inLanguage":"en-IN"},{"@type":"WebPage","@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/","url":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/","name":"SMS API CORS Error in Browser: Fix It Safely | Fast2SMS","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/#primaryimage"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-hd-33-scaled.webp","datePublished":"2026-11-18T20:25:36+00:00","dateModified":"2026-11-18T20:35:54+00:00","description":"Getting a CORS error calling the SMS API from JavaScript? Do not put the API key in the browser. Call Fast2SMS from your server with this simple setup.","breadcrumb":{"@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/#breadcrumb"},"inLanguage":"en-IN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/"]}]},{"@type":"ImageObject","inLanguage":"en-IN","@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/#primaryimage","url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-hd-33-scaled.webp","contentUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-hd-33-scaled.webp","width":2560,"height":1600,"caption":"API Key page with the masked Authorization Key, View and Reset buttons and the API Access switch turned on"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fast2sms.com\/help\/sms-api-cors-error-browser\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fast2sms.com\/help\/"},{"@type":"ListItem","position":2,"name":"API","item":"https:\/\/www.fast2sms.com\/help\/api\/"},{"@type":"ListItem","position":3,"name":"SMS API CORS error in the browser: keep the API key on your server"}]},{"@type":"WebSite","@id":"https:\/\/www.fast2sms.com\/help\/#website","url":"https:\/\/www.fast2sms.com\/help\/","name":"Fast2SMS","description":"Help","publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"inLanguage":"en-IN"},{"@type":"Organization","@id":"https:\/\/www.fast2sms.com\/#organization","name":"Fast2SMS","url":"https:\/\/www.fast2sms.com\/","logo":{"@type":"ImageObject","@id":"https:\/\/www.fast2sms.com\/#logo","url":"https:\/\/www.fast2sms.com\/Fast2SMS.png","contentUrl":"https:\/\/www.fast2sms.com\/Fast2SMS.png","caption":"Fast2SMS"},"image":{"@id":"https:\/\/www.fast2sms.com\/#logo"},"email":"support@fast2sms.com","telephone":"+91-6262778822","sameAs":["https:\/\/www.facebook.com\/Fast2SMS","https:\/\/www.instagram.com\/fast2sms","https:\/\/x.com\/fast2sms","https:\/\/www.youtube.com\/Fast2SMSofficial","https:\/\/www.linkedin.com\/company\/fast2sms"]}]}},"_links":{"self":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/19943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/comments?post=19943"}],"version-history":[{"count":1,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/19943\/revisions"}],"predecessor-version":[{"id":20065,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/19943\/revisions\/20065"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media\/19648"}],"wp:attachment":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media?parent=19943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/categories?post=19943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/tags?post=19943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}