POST: https://api.xebo.ai/api/v1/oauth/token

"Content-Type": "application/json"

Request Body

{ 
    "email": "john@xebo.ai", 
    "password": "Survey@123" 
} 

Field Type Mandatory Description
email string Yes Email of a valid XEBO.ai account
password string Yes Password for the corresponding account.


		

Request Sample


curl --location 'https://api.xebo.ai/api/v1/oauth/token' \ 
--header 'Content-Type: application/json' \ 
--data-raw '{ 
"email": "john@xebo.ai", 
"password": "Survey@123" 
} ' 
var data = JSON.stringify({
  email: "john@xebo.ai",
  password: "Survey@123",
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xebo.ai/api/v1/oauth/token");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);

Responses

{
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6VTX9eyq-gRQVLrlDxRUidHrA",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzIwNjg4MDczLCJpYXQiOjE3MjA2MDE2NzMsImp0aSI6IjI4M",
"expires_at": 1720688073,
"created_at": 1720601673

}
{
"success":false,
"code":400,
"status":"Bad Request",
"error":"invalid",
"message":"Invalid input.",
"data":{
"password":[
"This field is required."
]
}
}
{
"success":false,
"code":401,
"status":"Unauthorized",
"error":"no_active_account",
"message":"Incorrect email or password",
"data":{
"detail":"Incorrect email or password"
}
}
{ 
    "error": { 
        "name": "Internal Server Error", 
        "message": "We were not able to process your request" 
    } 
}

Note: Please do not share your tokens in publicly accessible areas or to anyone. Also, this token generated is valid for 24 hours only. After its expiry, you can regenerate the access token from the same API endpoint by passing the username and password or from the refresh token API with the help of refresh token.

Get Oauth Token from Refresh token

POST: https://survey2connect.com/v2/api/oauth/token/refresh Headers "Content-Type": "application/json" Request BodyPayload { "refresh_token": "eyJraWQiOiJzM3E1OWF2cFdIcXVKa0I0MjRpcFpqQVN0dXAzQzFkZEhVM3k2TjNZSXRjPSIsImFs" } Request SamplecURL curl --location --request POST 'https://survey2connect.com/v2/api/oauth/token/refresh' \ --header…

Get API Key

Step 1: Login to the portal Step 2: Logging ➜ Setting ➜ Preference ➜ API Key

Ask a human

Can't Find What You're Looking For?