Skip to main content
Sobot: All-in-One Contact Center Solution | Omnichannel & AI

Welcome

The Sobot Developer Platform provides customers with application development capabilities for multiple cloud products and diverse scenarios. Through Cloud APIs, you can quickly interact with Sobots’s cloud products with minimal code, enhancing efficiency for frequently used functions. You can also combine Cloud APIs to implement more advanced functionalities. Products include: CRM, Basic Agent Data, Text, Voice, Work Orders, Quality Assurance, Message Center, Mall Center, Zhike, etc. Sobot and Updates.

Sobot Developer Platform

View the OpenAPI specification file

Authentication

● Token Guide

The “token” param must be contained in the header of the https request when calling the API.
Token is the only global API call credential for the Sobot API open platform. It is used when developers call the business APIs and thus should be properly kept. At least 32 chars should be reserved to store token. The validity period of token is currently 24 hours. It needs to be refreshed regularly or reacquired according to the token failure prompt returned by the API. When requesting the token API, regardless of the existence of token, a new token will be returned and its expiry time will be reset (currently 24 hours). Token usage description:
  1. Developers need to obtain and manage the token uniformly. When calling the Sobot open APIs of various business, they should use the same token, instead of refreshing and obtaining new tokens for each business. Otherwise, it will easily lead to token invalidation and affect the normal API call.
  2. The current validity period of the token is transmitted by the returned expire_in, which is currently a value within 86,400 s. Developers need to refresh the new token in advance based on this valid time.
  3. Developers should reacquire the token according to the token invalidation prompt returned by the API.

● Get Token

API Description: Get the open API token, which is only applicable to all APIs of Sobot Open Platform v5.0. Contact the Sobot after-sales service personnel to get appid and app_key in the API. Request Method: GET Request URL:
 https://sg.sobot.io/api/get_token
Request Param:
ParamTypeRequiredDescription
appidStringYesThe 3rd-party user’s unique API call credential ID
create_timeStringYesTimestamp (s), e.g.: timestamp 1569397773 for 2019-09-25 15:49:33
signStringYesSignature, which is md5(appid+create_time+app_key) sign signature; app_key is a key
Request Example:
curl https://sg.sobot.io/api/get_token?appid=1&create_time=1569397773&sign=258eec3118705112b2c53dc8043d4d34
Return Param:
ParamTypeRequiredDescription
ret_codeStringYesReturn code
ret_msgStringYesReturn message
itemObjectNoReturn object
Item Object:
ParamTypeRequiredDescription
tokenStringYesToken code
expires_inStringYesCredential valid time (unit: s)
Timestamp conversion tool:https://www.unixtimestamp.com/sign Signature generation example:E.g., appid = “1”; create_time=“1569397773”; app_key=“2”sign = Md5(“115693977732”) is 258eec3118705112b2c53dc8043d4d34.
Return Example:
{
   "item": {
       "token": "4ac37cb2e9c740dba4b75a34d5358802",
       "expires_in": "86400"
   },
   "ret_code": "000000",
   "ret_msg": "Success"
}

Obtain Basic Data

Basic data as input parameters for other interfaces

● Query Time Zone

API Description: Search all time zones Request URL: GET Request URL:
https://sg.sobot.io/api/scrm/5/user/get_timezone
Request Param:
ParamTypeRequiredDescription
languageStringYesLanguage identification zh-Chinese en-English
Request Example:
curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://sg.sobot.io/api/scrm/5/user/get_timezone
?language=zh
Return Param:
ParamTypeRequiredDescription
ret_codeStringYesReturn code
ret_msgStringYesReturn message
itemsStringYesList of time zones
Items set:
ParamTypeRequiredDescription
idStringYesPrimary key
languageStringYesLanguage
timezone_valueIntegerYesTime zone value
timezoneidStringYesTime zone ID
Return Example:
{
    "items": [
      {
        "id": "aa08a602e63d4d188f52b0809e6794b0",
        "language": "zh",
        "timezone_value": "GMT-11:00 American Samoa",
        "timezoneid": "US/Samoa"
      }
    ],
    "ret_code": "000000",
    "ret_msg": "Success"
}

● Multiple Languages

API description: Search all languages Request URL: GET Request URL:
https://sg.sobot.io/api/scrm/5/user/get_language
Request Param:
ParamTypeRequiredDescription
languageStringYesLanguage identification zh-Chinese en-English
Request Example:
curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://sg.sobot.io/api/scrm/5/user/get_language
?language=zh
Return Param:
ParamTypeRequiredDescription
ret_codeStringYesReturn code
ret_msgStringYesReturn message
itemsStringYesLists of languages
Items set:
ParamTypeRequiredDescription
idStringYesPrimary key
languageStringYesLanguage
language_valueIntegerYesLanguage value
language_codeStringYeslanguage identification
Return Example:
{
    "items": [
      {
        "id": "aa08a602e63d4d188f52b0809e6794b0",
        "language": "zh",
        "language_value": "Simplified Chinese",
        "language_code": "zh"
      }
    ],
    "ret_code": "000000",
    "ret_msg": "Success"
}
● Search Country
API Description: Search all countries Request method: GET Request URL:
https://sg.sobot.io/api/scrm/5/user/get_country
Request Param:
ParamTypeRequiredDescription
languageStringYesLanguage identification zh-Chinese en-English
Request Example:
curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://sg.sobot.io/api/scrm/5/user/get_country
?language=zh
Return param:
ParamTypeRequiredDescription
ret_codeStringYesReturn code
ret_msgStringYesReturn message
itemsStringYesList of countries
Items set:
ParamTypeRequiredDescription
countryidStringYesCountry ID
country_nameStringYesCountry Name
Return Example:
{
    "items": [
      {
        "countryid": "101",
        "country_name": "China"
      }
    ],
    "ret_code": "000000",
    "ret_msg": "Success"
}