Chilkat Online Tools

C++ / Plivo REST API / Stop speaking text during a call

Back to Collection Items

#include <CkHttp.h>
#include <CkHttpResponse.h>

void ChilkatSample(void)
    {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttp http;
    bool success;

    http.put_BasicAuth(true);
    http.put_Login("{{auth_id}}");
    http.put_Password("password");

    CkHttpResponse *resp = http.QuickRequest("DELETE","https://api.plivo.com/v1/Account/<auth_id>/Call/{call_uuid}/Speak/");
    if (http.get_LastMethodSuccess() == false) {
        std::cout << http.lastErrorText() << "\r\n";
        return;
    }

    std::cout << resp->get_StatusCode() << "\r\n";
    std::cout << resp->bodyStr() << "\r\n";
    delete resp;
    }

Curl Command

curl -X DELETE
	-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Call/{call_uuid}/Speak/

Postman Collection Item JSON

{
  "name": "Stop speaking text during a call",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/Speak/",
      "protocol": "https",
      "host": [
        "api",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "Account",
        "{{auth_id}}",
        "Call",
        "{call_uuid}",
        "Speak",
        ""
      ]
    },
    "description": "This endpoint allows for stopping active text that are being spoken in the call.\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/call/speak-text-on-calls#stop-speaking-text-on-a-call)"
  },
  "response": [
    {
      "name": "Stop speaking text during a call",
      "originalRequest": {
        "method": "DELETE",
        "header": [
        ],
        "url": {
          "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/Speak/",
          "protocol": "https",
          "host": [
            "api",
            "plivo",
            "com"
          ],
          "path": [
            "v1",
            "Account",
            "{{auth_id}}",
            "Call",
            "{call_uuid}",
            "Speak",
            ""
          ]
        }
      },
      "code": 204,
      "_postman_previewlanguage": "json",
      "header": [
      ],
      "cookie": [
      ],
      "body": "{\n    \"message\": \"speak stopped\",\n    \"api_id\": \"cf2359c8-f4d6-11e6-b886-067c5485c240\"\n}"
    }
  ]
}