eTelecom docs
English
English
  • INSTRUCTIONS FOR USE
    • Administration page for cs.etelecom
    • Google Chrome Extension
    • App eTelecom
  • API INTEGRATION
    • Shop
      • Account
      • Usage
    • Partner
      • Account
      • Usage
    • VPBX
      • VoIP SDK
        • Android
        • iOS
        • Web
        • Flutter
      • PBX REST APIs
        • Partner Get Tenant List
        • Partner Add Hotline
        • Partner Get Hotline List
        • Partner Activate Tenant
        • Partner Add Hotline To Tenant
        • Partner Removed Hotline From Tenant
        • Partner Remove Hotline
        • Create Tenant
        • Get Tenant information
        • Get Driver Config
        • Get hotline list
        • Create Account User
        • Get List User
        • Create extension
        • Get extension information
        • Get extension list
        • Assign extension to user
        • Change hotline for extension
        • Remove User Of Extension
        • Get call history
    • Zalo Cloud
      • Instructions for connecting Zalo Cloud
      • Zalo Cloud API
        • Create OA authorization link
        • Connect OA
        • Get refresh token
        • Get OA list
        • Get OA information
        • Update Webhook for OA
        • Get list of users
        • Send Text Consulting
        • Send Consulting message according to user information request form
        • Send advice message with sticker
        • Send message Consulting with attached photo
        • Send message Consulting attached file
        • Send transaction message
        • Upload file
        • Send request for calling permission
        • Check if the customer has granted calling permission
        • Get list of requests for calling permission
        • Create a news template
        • Get sample details
        • Get list of news samples
        • Journey Token Creation
        • Get Journey Token Details
        • Get Journey Token List
        • Get message list
        • Get message details
        • Send ZNS
        • Send ZNS with Journey Token
  • SMS BRANDNAME
    • User manual
    • SMS API
      • Send SMS
      • Get message status
      • Get sample details
Powered by GitBook
On this page
  • Configuration
  • API Structure
  1. API INTEGRATION
  2. Shop

Usage

Configuration

The api_keyfollowing is provided and configured:

export API_KEY=<api_key>
export API_HOST=<base_url>

Instructions for using the commands exportand curlare provided when running in terminal on Linux or Mac operating systems. In case you use another environment, please replace them with equivalent operations.

API Structure

Request

A typical API call looks like this:

curl $BASE_URL.Misc/CurrentAccount \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  -d '{}'

All requests use HTTPS protocol, POST method and pass values ​​in body using data format application/json. Required headers are Content-Typeand Authorization.

Response

The response uses the data format application/jsonset in the header Content-Type. If the request is successful, the HTTP status code is 200. If the request fails, the HTTP status code can be . 4xxor . 5xxwith a structure similar to the following:

{
  "code": "invalid_argument",
  "msg": "..."
}

Common errors

400 Bad Request

{
  "code": "invalid_argument",
  "msg": "..."
}

Please double check the provided values.

401 Unauthorized

{
  "code": "unauthenticated",
  "msg": "..."
}

Please double check that the request includes the Authorization:<api_key>correct headers.

{
    "code": "bad_route",
    "msg": "unexpected Content-Type: \"\""
}

Please check the path and header again Content-Type: application/json.

PreviousAccountNextPartner

Last updated 5 months ago