Chilkat Online Tools

autoit / Plivo REST API / List all incoming carriers

Back to Collection Items

; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oHttp = ObjCreate("Chilkat_9_5_0.Http")
Local $bSuccess

$oHttp.BasicAuth = True
$oHttp.Login = "{{auth_id}}"
$oHttp.Password = "password"

$oQueryParams = ObjCreate("Chilkat_9_5_0.JsonObject")
$oQueryParams.UpdateInt("limit",5)
$oQueryParams.UpdateInt("offset",0)

Local $oResp = $oHttp.QuickRequestParams("GET","https://api.plivo.com/v1/Account/<auth_id>/IncomingCarrier/",$oQueryParams)
If ($oHttp.LastMethodSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite($oResp.StatusCode & @CRLF)
ConsoleWrite($oResp.BodyStr & @CRLF)

Curl Command

curl -G -d "limit=5"
	-d "offset=0"
	-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/IncomingCarrier/

Postman Collection Item JSON

{
  "name": "List all incoming carriers",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/IncomingCarrier/?limit=5&offset=0",
      "protocol": "https",
      "host": [
        "api",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "Account",
        "{{auth_id}}",
        "IncomingCarrier",
        ""
      ],
      "query": [
        {
          "key": "name",
          "value": "carrier_name",
          "description": "Allows filtering by name",
          "disabled": true
        },
        {
          "key": "limit",
          "value": "5",
          "description": "Used to display the number of results per page. The maximum number of results that can be fetched is 20."
        },
        {
          "key": "offset",
          "value": "0",
          "description": "Denotes the number of value items by which the results should be offset."
        }
      ]
    }
  },
  "response": [
  ]
}