Manage User
Block and Unblock User

Block User

post
โ€Ž
https://<domain>/<api prefix>/<version>/block/user/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'POST',
4
'url': 'https://<domain>/<api prefix>/<version>/block/user/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Beare <access-token>'
8
},
9
formData: {
10
'unique_id': '<user_unique_id>'
11
}
12
};
13
request(options, function (error, response) {
14
if (error) throw new Error(error);
15
console.log(response.body);
16
});
17
โ€‹
Copied!
PHP
1
<?php
2
โ€‹
3
$curl = curl_init();
4
โ€‹
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/block/user/',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS => array('unique_id' => '<user_unique_id>'),
15
CURLOPT_HTTPHEADER => array(
16
'apikey: <apikey>',
17
'Authorization: Bearer <access-token>'
18
),
19
));
20
โ€‹
21
$response = curl_exec($curl);
22
โ€‹
23
curl_close($curl);
24
echo $response;
Copied!

Error Responses

Status Code
Error Type
Field
Description
400
Validation Error
unique_id
This field is required and its may not be blank.
User not exist or invalid unique id.
Ensure this field has no more than 255 characters.

Unblock User

post
โ€Ž
https://<domain>/<api prefix>/<version>/unblock/user/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'POST',
4
'url': 'https://<domain>/<api prefix>/<version>/unblock/user/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Beare <access-token>'
8
},
9
formData: {
10
'unique_id': '<user_unique_id>'
11
}
12
};
13
request(options, function (error, response) {
14
if (error) throw new Error(error);
15
console.log(response.body);
16
});
17
โ€‹
Copied!
PHP
1
<?php
2
โ€‹
3
$curl = curl_init();
4
โ€‹
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/unblock/user/',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS => array('unique_id' => '<user_unique_id>'),
15
CURLOPT_HTTPHEADER => array(
16
'apikey: <apikey>',
17
'Authorization: Bearer <access-token>'
18
),
19
));
20
โ€‹
21
$response = curl_exec($curl);
22
โ€‹
23
curl_close($curl);
24
echo $response;
Copied!

Error Responses

Status Code
Error Type
Field
Description
400
Validation Error
unique_id
This field is required and its may not be blank.
User not exist or invalid unique id.
Ensure this field has no more than 255 characters.
โ€‹
Last modified 1mo ago