Chilkat Online Tools

Perl / Plivo REST API / Deaf a conference member

Back to Collection Items

use chilkat();

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

$http = chilkat::CkHttp->new();

$http->put_BasicAuth(1);
$http->put_Login("{{auth_id}}");
$http->put_Password("password");

# Use this online tool to generate code from sample JSON: Generate Code to Create JSON

# The following JSON is sent in the request body.

# {}

$json = chilkat::CkJsonObject->new();

# resp is a HttpResponse
$resp = $http->PostJson3("https://api.plivo.com/v1/Account/<auth_id>/Conference/{conference_name}/Member/{member_id}/Deaf/","application/json",$json);
if ($http->get_LastMethodSuccess() == 0) {
    print $http->lastErrorText() . "\r\n";
    exit;
}

print $resp->get_StatusCode() . "\r\n";
print $resp->bodyStr() . "\r\n";

Curl Command

curl -X POST
	-u '{{auth_id}}:password'
	-d '{
    
}'
https://api.plivo.com/v1/Account/<auth_id>/Conference/{conference_name}/Member/{member_id}/Deaf/

Postman Collection Item JSON

{
  "name": "Deaf a conference member",
  "request": {
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Member/{member_id}/Deaf/",
      "protocol": "https",
      "host": [
        "api",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "Account",
        "{{auth_id}}",
        "Conference",
        "{conference_name}",
        "Member",
        "{member_id}",
        "Deaf",
        ""
      ]
    },
    "description": "This method allows you to deaf a particular member in the conference. When this operation is made on a conference member, the member will not be able to hear any audio from the conference.\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/conference/member#deaf-a-member)"
  },
  "response": [
    {
      "name": "Deaf a conference member",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Member/{member_id}/Deaf/",
          "protocol": "https",
          "host": [
            "api",
            "plivo",
            "com"
          ],
          "path": [
            "v1",
            "Account",
            "{{auth_id}}",
            "Conference",
            "{conference_name}",
            "Member",
            "{member_id}",
            "Deaf",
            ""
          ]
        }
      },
      "code": 202,
      "_postman_previewlanguage": "json",
      "header": [
      ],
      "cookie": [
      ],
      "body": "{\n    \"message\": \"deaf\",\n    \"member_id\": \"10\",\n    \"api_id\": \"2867b6e2-58c3-11e1-86da-adf28403fe48\"\n}"
    }
  ]
}