Tag: receive sms online non voip

  • Text2FA API Integration Guide

    Text2FA API Integration Guide

    Prerequisites

    • A Text2FA account (sign up at https://text2fa.com)
    • At least one rented non-VoIP number in your dashboard
    • Your API key (Settings → API Key)
    • A development environment for your chosen language (Node.js, Python, PHP, etc.)

    Authentication

    Every request must include your API key in the Authorization header:

    Authorization: Bearer YOUR_API_KEY
    Content-Type: application/json
    

    Renting a Non-VoIP Number

    1. Log in to your dashboard and go to Numbers.
    2. Filter by Non-VoIP to display mobile numbers.
    3. Select country, quantity, and rental duration.
    4. Complete payment (e.g., $0.25 for 24h rental).
    5. Note the number_id for API calls.

    Key Endpoints

    PurposeMethodEndpoint
    List rented numbersGET/v1/numbers
    Poll messagesGET/v1/numbers/{number_id}/messages
    Register webhookPOST/v1/webhooks
    List webhooksGET/v1/webhooks
    Delete webhookDELETE/v1/webhooks/{webhook_id}
    Account details & balanceGET/v1/account-details

    Listing Your Numbers

    curl -X GET https://api.text2fa.com/v1/numbers \
         -H "Authorization: Bearer YOUR_API_KEY"
    

    Response sample:

    [
      {
        "id": "12345",
        "number": "+15551234567",
        "type": "non-voip",
        "country": "US"
      }
    ]
    

    Receiving SMS Messages

    A. Polling (Basic)

    curl -X GET https://api.text2fa.com/v1/numbers/12345/messages \
         -H "Authorization: Bearer YOUR_API_KEY"
    

    Response sample:

    [
      {
        "from": "+12135559876",
        "message": "Your OTP is 843291",
        "received_at": "2025-06-26T08:15:00Z"
      }
    ]
    

    B. Webhooks (Real-Time)

    1. Register your webhook: curl -X POST https://api.text2fa.com/v1/webhooks \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "url": "https://yourapp.com/text2fa-webhook" }'
    2. Handle inbound POSTs at /text2fa-webhook: { "number_id": "12345", "from": "+12135559876", "message": "Your OTP is 843291", "received_at": "2025-06-26T08:15:00Z" }
    3. Example handler (Node.js/Express): import express from 'express'; const app = express(); app.use(express.json()); app.post('/text2fa-webhook', (req, res) => { const { number_id, from, message, received_at } = req.body; console.log(`SMS for ${number_id} from ${from}: ${message}`); res.sendStatus(200); }); app.listen(3000, () => console.log('Listening on 3000'));

    Code Examples

    Python (requests)

    import requests
    
    API_KEY = "YOUR_API_KEY"
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json",
    }
    
    # List numbers
    resp = requests.get("https://api.text2fa.com/v1/numbers", headers=headers)
    print(resp.json())
    

    PHP (cURL)

    <?php
    $apiKey = 'YOUR_API_KEY';
    $ch = curl_init('https://api.text2fa.com/v1/numbers');
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        "Authorization: Bearer {$apiKey}",
        "Content-Type: application/json",
    ]);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($ch);
    curl_close($ch);
    $numbers = json_decode($response, true);
    print_r($numbers);
    

    Best Practices

    • Secure Webhooks: Validate requests using signatures or IP whitelisting.
    • Error Handling: Implement retries with exponential backoff on 5xx errors.
    • Rate Limits: Respect API limits; batch polling intervals.
    • Key Rotation: Periodically regenerate your API key in the dashboard.
    • Analytics: Monitor delivery rates in Analytics → Reports.

    Conclusion

    Rent a number, plug in your API key, and start processing SMS with Text2FA’s simple REST API. For complete details, visit:

    🔗 https://text2fa.com/api-documentation

  • Earn a 5% Affiliate Bonus with Text2FA

    Earn a 5% Affiliate Bonus with Text2FA

    Earn a 5% Affiliate Bonus with Text2FA

    Refer friends, colleagues, or clients to Text2FA and get rewarded for every dollar they spend. Here’s how it works:

    1. Sign Up as an Affiliate
      Create a free Text2FA affiliate account via our Affiliate Portal. You’ll receive a unique referral link and tracking dashboard.
    2. Share Your Link
      Promote Text2FA on your website, blog, social media, or email newsletter. Whenever someone clicks your link and funds their Text2FA balance, you earn a bonus.
    3. Earn 5% on Every Purchase
      For each top-up your referral makes, we’ll credit your affiliate account with 5% of their spend—automatically and in real time.
    4. Quick Payouts
      Once your accrued bonus reaches $50, you can request payout via PayPal or bank transfer. No hidden fees, no hoops to jump through.

    Why Join Our Affiliate Program?

    • Competitive Commission: 5% on all SMS credits purchased.
    • Transparent Tracking: Monitor clicks, sign-ups, and earnings in your dashboard.
    • Marketing Assets Provided: Get banners, email templates, and social posts designed to convert.
    • Dedicated Support: Our affiliate manager is standing by to help you optimize performance.

    Ready to start earning? Sign up now and turn every referral into passive income with Text2FA’s 5% affiliate bonus!