cURL Examples

cURL is one of the most basic tools that allow to send requests to APIs. The usage is very simple, you can call it in a terminal with access and request data.

Here’s a simple example – let’s create an event. We use the event information from our examples; you can copy the code below, but remember to provide your own API key.

curl --request POST https://api.clickmeeting.com/v1/conferences --header "X-Api-Key:API_KEY" --data "name=room_name&room_type=meeting&access_type=1&permanent_room=0"

If everything goes ok, you should see a response similar to this:

{
    "room": {
        "id":123456,
        "room_type":"meeting",
        "room_pin":123123123,
        "name":"room_name",
        "name_url":"room_name",
        "starts_at":"2014-11-21T11:09:21+01:00",
        "ends_at":"2014-11-21T13:09:00+01:00",
        "access_type":1,
        "lobby_enabled":"1",
        "lobby_description":"",
        "registration_enabled":0,
        "status":"active",
        "timezone":"America/New_York",
        "timezone_offset":3600,
        "created_at":"2014-11-21T11:09:21+01:00",
        "updated_at":"2014-11-21T11:09:21+01:00",
        "autologin_hash":"ZmVkBGt4DU__",
        "permanent_room":false,
        "access_role_hashes":{
            "listener":"f2ddff84f49300546f0f51",
            "presenter":"a3acc948f58fgk80ca00546f0f51",
            "host":"be24f3fsf84ff7800546f0f51"
        },
        "room_url":"https://example.clickmeeting.com/room_name",
        "phone_presenter_pin":123123,
        "phone_listener_pin":123123,
        "embed_room_url":"https://embed.clickmeeting.com/embed_conference.html?r=123123123",
        "widgets_hash":"6C42133",
        "recorder_list":[]
    }
}

Now let’s try to use the received ID number to delete previously created room. We’ll need to call the conferences/<:room_id> method:

curl --request DELETE https://api.clickmeeting.com/v1/conferences/123456 --header "X-Api-Key:API_KEY"

You should now see a response similar to this:

{"result":"OK"}

As you see, you just have to call a certain API method (specifying the HTTP method) and provide the request data.