Skip to content
Fast2SMS Help Center
API Docs Contact Us Sign up free

How to find, view and reset your Fast2SMS API key

Your Fast2SMS API key is on the API Key page under Account Setting. Click View, enter the OTP sent to your registered mobile, and the full key appears so you can copy it. Send it in the authorization header of every API call. This guide also shows how to reset the key if it leaks, how to switch API access off without changing the key, and how to fix the common “Invalid Authentication” errors.

Connect your app to Fast2SMS

Get your API key and send SMS, Smart OTP, WhatsApp and RCS from your website or software.

Sign up free →Book a free meeting

Before you start

  • You must log in as the account owner. Team members cannot open Account Setting pages.
  • Keep your registered mobile handy. Viewing or resetting the key needs an OTP sent to it by SMS and WhatsApp.

How to find your Fast2SMS API key

  1. Open Account Setting and click API Key

    On the dashboard, click Account Setting in the Utility row, then API Key under UTILITY in the left menu. You can also use API Key in the apps menu at the top left, or the API Key link inside the SMS, WhatsApp, Smart OTP, RCS and Voice menus.

    The page shows a status pill (Enabled or Disabled), the time the key was created, and the Authorization Key with only its first 4 characters visible.

    Fast2SMS API Key page with a masked Authorization Key, View and Reset buttons, and the API Access and Quick API Access switches
    The API Key page in Account Setting.
  2. Click View and confirm with OTP

    Click View. A box asks “View Authorization Key?” and says an OTP will be sent to your mobile. Click Confirm, enter the OTP, and the key is shown with the message “Authorization Key revealed successfully.”

    View Authorization Key confirmation box saying an OTP will be sent to your mobile, with Cancel and Confirm buttons
    An OTP protects your key.
  3. Copy the key

    Click the copy icon in the key box. If you click it before viewing the key, you see “View the API key first, then copy it.”

After one OTP is verified, other OTP-protected changes on these pages (for example a switch you change straight after) do not ask for a new OTP for the next 5 minutes. The panel then says “Confirm to apply (OTP already verified).”

How to use the API key in a request

Put the key in a header named authorization. Send the key alone, with no quotes, spaces or “Bearer” in front. A quick way to check that your key works is to ask for your wallet balance, which sends no message and costs nothing:

curl -X POST "https://www.fast2sms.com/dev/wallet" \
  -H "authorization: YOUR_API_KEY"

A working key returns something like this:

{"return":true,"wallet":"4850.7500","sms_count":19403}

The same check in PHP and Python:

<?php
$ch = curl_init("https://www.fast2sms.com/dev/wallet");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["authorization: YOUR_API_KEY"],
]);
echo curl_exec($ch);
curl_close($ch);
import requests

r = requests.post("https://www.fast2sms.com/dev/wallet",
                  headers={"authorization": "YOUR_API_KEY"})
print(r.json())

Keep the key on your server, for example in an environment variable. Never put it in a mobile app, browser JavaScript or a public code repository, because anyone who has it can send messages from your wallet.

Some no-code tools cannot set headers. Only for those, the key can go in the URL as ?authorization=YOUR_API_KEY. Prefer the header wherever you can, since URLs are saved in server and proxy logs.

Send your first API message

Use your API key with the DLT SMS, Smart OTP or WhatsApp API and see each call in API Logs.

Sign up free →Book a free meeting

How to reset (rotate) your API key

Reset the key if it was shared by mistake, if a developer leaves, or as a regular safety step.

  1. Click Reset and confirm

    On the API Key page, click Reset. The box “Reset API Key?” warns that your current key will stop working. Click Confirm and enter the OTP. You see “API key regenerated successfully.” The new key is 60 characters long. A reset also turns API Access back on.

    Reset API Key confirmation box warning that the current key will stop working and an OTP will be sent
    The old key stops working as soon as you reset.
  2. Update every place that uses the key

    The old key stops at once, so update your website, app servers and any plugin that uses it: Shopify, WooCommerce or WordPress, Tally, Google Sheets and other integrations. Then open API Logs to check that new calls succeed.

To keep downtime short, have the new key ready to paste into your systems before you click Reset, and do it at a quiet time of day.

Turn API access off without changing the key

The API Access switch blocks all API calls while keeping the same key. Use it if you suspect misuse and want to stop sending at once. Turning it off needs an OTP and also turns off Quick API Access. While it is off, every call gets error 413 “Invalid Authentication, Authorization Key Disabled”. Turn it back on the same way.

Disable API Access confirmation saying all Dev API requests will be rejected and Quick API Access will also be disabled
Switching API Access off rejects every API request.

Quick API Access controls only the Quick SMS route (route=q). It can be on only when API Access is on; otherwise you see “Enable API Access first before enabling Quick API Access.”

API key errors and how to fix them

Error What it means Fix
412 “Invalid Authentication, Check Authorization Key” Key missing, wrong, has extra characters, or was reset View the current key, copy it again and send it in the authorization header
413 “Invalid Authentication, Authorization Key Disabled” API Access is switched off Turn on API Access on the API Key page
414 “IP is blacklisted from Dev API section” API Security is on and your server IP is not whitelisted Add the server’s public IP in API Security
415 “Account Disabled” The account is disabled Contact support
428 “Quick API Access is disabled.” You called route=q with Quick API Access off Turn on Quick API Access
“Authorization key required” / “Invalid authorization key” Smart OTP API: key missing or wrong Send the bare key in the authorization header, without “Bearer”

These errors come back with HTTP status 401. Calls with a wrong or missing key are not saved in API Logs, because they cannot be linked to your account.

Common problems and fixes

“Please wait to send new OTP.”

You can ask for one OTP every 30 seconds. Wait and click again.

“Daily OTP limit exhausted. Try again after sometime.”

Too many OTP requests were made today. Try again later, or contact support if you need the key urgently.

The key worked yesterday and fails today

Someone may have reset the key or switched API Access off. Check the status pill and the Created time on the API Key page.

Frequently asked questions

Where is the API key in the Fast2SMS panel?

Account Setting, then API Key under UTILITY. Click View and enter the OTP to see it.

Is the API key free?

Yes. There is no charge for the key. You pay only for the messages you send.

Can I have more than one API key?

The API Key page shows one key per account. Resetting it replaces the old key with a new one.

Should I write “Bearer” before the key?

No. Send the key alone in the authorization header. The Smart OTP API does not accept a “Bearer” prefix.

Can a team member see the API key?

No. The API Key page is only for the account owner.

Why does the key need an OTP to view?

The key gives full access to your wallet for sending. The OTP makes sure only the person with the registered mobile can see or change it.

Build with the Fast2SMS API

Create your account, copy your API key and start sending DLT SMS and Smart OTP from your own code.

Sign up free →Book a free meeting

Related guides

  • Webhooks in Fast2SMS: get delivery reports on your own URL
  • Smart OTP in Fast2SMS: set up OTP on SMS and WhatsApp with fallback
  • How Bulk SMS works in Fast2SMS
  • Bulk SMS API for India
  • Bulk SMS API error handling and troubleshooting

Related articles

  • Team member can’t see WhatsApp chats or numbers? Live Chat access problems fixed
  • How to contact Fast2SMS support: ticket, email, meeting and feature requests
  • Fast2SMS new panel tour: dashboard, apps, wallet rates and where everything moved
  • Paid but wallet not credited, or payment failed? What to do after a Fast2SMS recharge

    New to Fast2SMS?

    Get ₹50 free credit when you sign up.

    Sign up free or book a free meeting

    Topics

    • Bulk SMS
    • WhatsApp
    • OTP
    • RCS
    • Voice Call
    • DLT
    • Delivery Report
    • Transaction
    • Address Book
    • Webhooks

    On this page

    1. Before you start
    2. How to find your Fast2SMS API key
    3. How to use the API key in a request
    4. How to reset (rotate) your API key
    5. Turn API access off without changing the key
    6. API key errors and how to fix them
    7. Common problems and fixes
    8. Frequently asked questions
    9. Related guides
    Sign up free

    Products

    • Bulk SMS Service
    • WhatsApp Business API
    • OTP SMS
    • RCS Messaging
    • Voice Call (OBD)
    • Cloud Telephony
    • Quick SMS without DLT
    • Campaign Flow Builder
    • Integrations

    Pricing

    • Bulk SMS Pricing
    • WhatsApp Pricing
    • RCS Pricing
    • Voice Call Pricing
    • Cloud Telephony Pricing

    Guides

    • How to send bulk SMS in India
    • Send bulk WhatsApp messages
    • Official WhatsApp Business API
    • WhatsApp OTP API
    • RCS business messaging
    • Bulk voice call service
    • WooCommerce SMS & WhatsApp plugin
    • Shopify SMS & WhatsApp app
    • DLT Registration

    Bulk SMS for

    • Bulk SMS API
    • OTP SMS provider in India
    • Bulk SMS for marketing
    • Bulk SMS for E-commerce
    • Bulk SMS for Schools
    • Bulk SMS for Hospitals
    • Bulk SMS for Real Estate
    • Bulk SMS in Delhi
    • Bulk SMS in Mumbai

    Company

    • About Us
    • Why Fast2SMS
    • Certificates
    • SMS Reseller
    • Contact Us
    • API Docs
    • Sitemap
    Fast2SMS [email protected] +91 6262778822

    Social links

    Meta Business Partner
    © 2026 Fast2SMS. All rights reserved. Privacy Policy · Terms · Article sitemap · Page sitemap