Authentication

Tulu Switch API authentication guide! To keep your transactions secure, we require all API requests to be authenticated. This guide will walk you through the authentication process step by step, ensuring you can seamlessly integrate our APIs into your application.

Overview

Tulu Switch APIs use cryptographic authentication to protect your transactions from fraud. When you create a Tulu Switch account, you’ll receive API keys that are required for authentication.

  • Bearer Token Authentication: Used for all API requests after generating a Bearer Token.

API KEYS

  • Your API keys are auto-generated after you fill in and submit your webhook URL. They can be found on your dashboard under the Settings section.

Generating API Key:

  • To generate an API key:
  • Sample code

    # Step 1: Log in to your Tulu Switch dashboard

    # Step 2: Navigate to the Settings "API" section

    # Step 3: Generate a new API key

    Generating a Bearer Token

    The Bearer Token has an expiry time of 24 hours. Be sure to regenerate it before it expires.

    Request Payload

    The code snippet below shows an example request for generating a bearer token

    {
        "private_key":"sSAp0cJBLSGWXYnLfYICf83iZb3pTfu0kVUO",
        "public_key":"nO5rnU8hJmLUdvRFK95SfyigQ53dfU4p6fLeuUWF6RB6qyaTm25x5tN8NKuLTGLi"
    }

    Response Sample

    The code snippet below shows an example request for generating a bearer token

    {
        "statusCode": "00",
        "status": "success",
        "data": {
            "bearerToken": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJidXNpbmVzc19lbWFpbCI6ImFkZW5peWlqYW1lc2FAZ21haWwuY29tIiwiY29tcGxpYW5jZVN0YXR1cyI6bnVsbCwiYXBwcm92ZWRfc3RhdHVzIjowLCJpYXQiOjE3Mzg2Nzk5NTEsImV4cCI6MTczODc2NjM1MX0.HXuWQsedaF_XMif6y4__qVb0pVLK6zQf32k8Jy2OB3Q",
            "expiryTime": "2025-02-05T14:39:11.668Z"
        }
    }
     

    Example:

    Authorization: Bearer Token

    Important Notes

    The Bearer Token has an expiry time, so ensure you regenerate it when it expires.

    All API requests must be made over HTTPS.

    Authentication requirement for API requests

    • API requests made without authentication will fail with the status code 401: Unauthorized. All API requests must be made over HTTPS.

    Contact Us for Developer Support

    Contact our dedicated developer support team for assistance, guidance, or any questions you have regarding Tuluswitch API integration. We're here to ensure your development experience is smooth and successful.

    Read Our Developer FAQ for Insights

    Master the Tuluswitch API with our Developer Blog! Get expert insights, advanced tips, and industry trends beyond the documentation. Stay connected with the developer community to build exceptional payment platforms. Visit the blog now and unlock your full potential!