Our users API can be used to add and manage users for AtomChat
List Users
POST - https://api.cometondemand.net/api/v2/listUsers
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/listUsers", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "offset=0&limit=100", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/listUsers \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data offset=0 \ --data limit=100
Create User
POST - https://api.cometondemand.net/api/v2/createUser
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometondemand.net/api/v2/createUser",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \ --url https://api.cometondemand.net/api/v2/createUser \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Get User
POST - https://api.cometondemand.net/api/v2/getUser
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/getUser", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "returnFriends=false&returnJoinedGroups=false", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/getUser \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data returnFriends=false \ --data returnJoinedGroups=false
Get User Status
POST - https://api.cometondemand.net/api/v2/getUserStatus
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/getUserStatus", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/getUserStatus \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Delete User
POST - https://api.cometondemand.net/api/v2/deleteUser
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/deleteUser", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/deleteUser \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Update User
POST - https://api.cometondemand.net/api/v2/updateUser
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/updateUser", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/updateUser \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Add Friends
POST - https://api.cometondemand.net/api/v2/addFriends
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/addFriends", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/addFriends \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Delete Friends
POST - https://api.cometondemand.net/api/v2/deleteFriends
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/deleteFriends", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/deleteFriends \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Block User
POST - https://api.cometondemand.net/api/v2/blockUser
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/blockUser", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/blockUser \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Unblock User
POST - https://api.cometondemand.net/api/v2/unblockUser
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/unblockUser", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/unblockUser \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article