Opentact
  • Opentact Introduction
  • KEY CONCEPTS
    • Basic Concept
      • Voice Capability
        • Managing Inbound Calls
      • SMS Capability
      • Number Capability
    • Phone Number
      • Voice Enablement
      • SMS Enablement
      • TN Profile
        • Blacklist Caller ID
        • Whitelist Caller ID
    • SIP Control APP
      • Specify Remote Call Control URL
      • Specify Dialplan XML
    • SIP Trunking
    • Messaging
      • Quick Start Guide
      • Prepare Phone Numbers for SMS
    • SIP Connection
      • Associate SIP Connection with Phone Number
    • SIP Domain
      • Send Outbound Call with SIP Domain
      • Receive Inbound Call to SIP User
        • Web Call
        • Zoiper SIP Client
    • SIP Users
      • Create a SIPUser
      • Create a SIPUserInvite
    • Telecom Data
  • Opentact API Documentation
    • Opentact API Integration
      • API Environment
      • Opentact API keys
      • Passing Authentication
      • Authentication API
        • Example API Call
        • Authentiction with Gmail
    • TN Profile
      • Add and Remove Blacklist to TN Profile
        • Example API Call
      • Add and Remove Whitelist to TN Profile
        • Example API Call
    • Phone Number
      • Order Phone Number
        • Example API Usage
      • Release a Number
        • Example API Usage
      • Get all Purchased Numbers
      • Number Search
        • Example API Usage
    • SIP Connection
      • Remove Number from SIP Connection
      • Get Number for a SIP Connection
      • Update SIP Connections
      • Create SIP Conenctions
      • Delete SIP Connections
      • List SIP Connections
      • Assign Number to a SIP Connection
    • Messaging
      • Enable SMS on Numbers
      • Disable SMS on Number
      • Send SMS with Pool
      • Send SMS with Number
      • Receiving SMS
      • Retrieve Message Detail Records
      • Receiving Messaging Events
    • Log Retrieval
      • Retrieve Call Log
      • Retrieve SMS Log
    • Calling
      • Bridge two calls
      • Make Single Call
      • Make Bulk Call
        • Example API Call
    • SIP Domain
      • Create SIP Domain
      • Create SIP User
      • Deleting SIP User
      • Modify SIP User
    • Websocket Event Subscription
      • Create Subscription
      • Remove Subscription
      • Get Subscribed Events
        • Example API Call
  • Websocket Events
    • Event Websocket
    • Websocket Authentication
      • How to Authenticate to WSS
      • Authentication Response
      • Explanation of JSON response
    • Event Definition
      • Call Initiated
        • Example Event
      • Call Ringing
        • Example Event
      • Call Live
        • Example Event
      • Callflow
        • Example Event
      • Call Hangup
        • Example Event
      • Call Destroyed
        • Example Event
      • Call Bridged
        • Example Event
      • Call Answered
        • Example Event
      • Account events
        • Example Event
      • SMS events
        • Example Event
      • TN events
        • Example Event
      • Record Events
        • Example Event
      • Transcript
        • Example Event
      • General Event Fields
      • Example Event
  • Opentact XML
    • Overview
    • <Call/>
    • <Callback/>
    • <Geo/>
    • <Scheduler/>
    • <Play/>
    • <Say/>
    • <Hangup/>
    • <Pause/>
    • <Record/>
    • </Dial>
    • </Gather>
    • <Answer/>
    • <Hold/>
    • <Tone/>
    • <Error/>
    • <Default/>
    • <Meta/>
    • <Curl/>
  • How to build your Opentact Application
    • Introduction
    • Inbound Call Control
    • Opentact Events
    • Call Flow Control
      • Specify CallFlow for TN
        • Dynamic Call Flow XML
        • Basic Workflow
      • Handle Inbound Call
    • Send and Receive SMS
      • Life Cycle of SMS Delivery
      • Real-time SMS over Websocket
      • Send SMS via Restful API
    • Send and Receive SIP Calls
      • Create SIP User
      • Make Calls Between SIP User
      • Receive Calls as SIP User
  • Regulatory Compliance
    • 10DLC FAQs
    • Stir Shaken
  • SIP Trunking
    • Use Opentact for SIP Trunking
  • Webhook Event
    • Introduction
    • Test Webhook with Opentact
    • Event Definition
Powered by GitBook
On this page
  • Step 1: Obtain Password
  • Step 2: Generate Base64 Key
  • Step 3: Generate API Token

Was this helpful?

  1. Opentact API Documentation
  2. Opentact API Integration
  3. Authentication API

Authentiction with Gmail

PreviousExample API CallNextTN Profile

Last updated 1 year ago

Was this helpful?

Step 1: Obtain Password

If you choose to register to Opentact with your Gmail account, Opentact will send you an email with your password. Here is how the email looks like:

Step 2: Generate Base64 Key

Next, you will take your gmail and password above to generate a base64 key using the following command in Linux:

echo -n 'testuser@gmail.com:18aec2c0-1e9c-48d9-b7a2-363063a153ff' | base64 

You should obtain from the above command a token like this:

dGVzdHVzZXJAZ21haWwuY29tOjE4YWVjMmMwLTFlOWMtNDhkOS1iN2EyLTM2MzA2M2ExNTNmZg==

You can revert the token with the following command:

echo -n 'dGVzdHVzZXJAZ21haWwuY29tOjE4YWVjMmMwLTFlOWMtNDhkOS1iN2EyLTM2MzA2M2ExNTNmZg==' | base64 -d

testuser@gmail.com:18aec2c0-1e9c-48d9-b7a2-363063a153ff%

Step 3: Generate API Token

You can use the following command to generate API token which you can use to execute Openatct APIs:

curl https://api.opentact.org/rest/auth --header 'Authorization: Basic aW5oZXJpdGVkYXJ0c0BnbWFpbC5jb206MThhZWMyYzAtMWU5Yy00OGQ5LWI3YTItMzYzMDYzYTE1M2Zm'

Here is an example output:

{
  "success": true,
  "payload": {
    "created_on": "2020-10-19T05:32:33.415Z",
    "modified_on": "2024-02-27T07:41:48.945Z",
    "uuid": "4521f972-dcc7-4755-be99-dacc1892abb4",
    "email": "alexey.matvienko@gmail.com",
    "phone_number": "343434334",
    "first_name": "Алексей",
    "wss_online": false,
    "last_name": "М",
    "avatar": "https://s3.opentact.org/avatar/4521f972-dcc7-4755-be99-dacc1892abb4.png",
    "dob": null,
    "role": "User",
    "gender": null,
    "deleted_on": null,
    "token": "eyJhbGciOiJIUzR5cCI6IkpXVCJ9.eyJ1dWlkIjoiNDUyMWY5Ny00NzU1LWJlOTktZGFjYzE4OTJhYmI0Iiwicm9sZSI6IkFkbWluIiwiZG9tYWluIjoib3BlbnRhY3Qub3JnIiwixNzA5NTM0OTc1LCJleHA2MjEzNzQeUPpllWBc7hyvpt063VuVJMOeFPFmbFq4k",
    "account": {
      "created_on": "2020-09-28T09:20:22.830Z",
      "modified_on": "2020-10-02T05:59:55.196Z",
      "uuid": "4c1645f4-8be8-4f6d-a4ff-f0ac33ed6ada",
      "email": "info@denovolab.com",
      "name": "DENOVOLAB",
      "phone": 87015260731,
      "level": "Level2",
      "address1": null,
      "address2": null,
      "zip_code": null,
      "city": null,
      "deleted_on": null,
      "disabled_on": null,
      "balance": 0
    }
  }
}// Some code

The token you used above can be used for executing Opentact API.

"token": "eyJhbGciOiJIUzR5cCI6IkpXVCJ9.eyJ1dWlkIjoiNDUyMWY5Ny00NzU1LWJlOTktZGFjYzE4OTJhYmI0Iiwicm9sZSI6IkFkbWluIiwiZG9tYWluIjoib3BlbnRhY3Qub3JnIiwixNzA5NTM0OTc1LCJleHA2MjEzNzQeUPpllWBc7hyvpt063VuVJMOeFPFmbFq4k",// Some code