Table of Contents
Create Group. Requires “create_group” API permission.POST https://androidapi.net/api/create/group
Parameter #
Field | Type | Description |
---|---|---|
secret | String | The API secret you copied from (Tools -> API Keys) page |
name | String | Name of group |
Success Response Format #
Field | Type | Description |
---|---|---|
status | Number | List of Codes 200 = Success |
message | String | Response message |
data | Array | Array of data |
Error Response Format #
Name | Type | Description |
---|---|---|
status | Number | List of Codes 400 = Invalid parameters 401 = Invalid API secret 403 = Access denied 500 = Something went wrong |
message | String | Response message |
data | Array | Array of data |
PHP Sample #
<?php
$group = [
"secret" => "API_SECRET", // your API secret from (Tools -> API Keys) page
"name" => "Friends"
];
$cURL = curl_init("https://androidapi.net/api/create/group");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_POSTFIELDS, $group);
$response = curl_exec($cURL);
curl_close($cURL);
$result = json_decode($response, true);
// do something with response
print_r($result);
Python Sample #
import requests
# your API secret from (Tools -> API Keys) page
apiSecret = "API_SECRET"
group = {
"secret": apiSecret,
"name": "Friends"
}
r = requests.post(url = "https://androidapi.net/api/create/group", params = group)
# do something with response object
result = r.json()
Successful Response #
{
"status": 200,
"message": "Contact group has been created!",
"data": false
}
Error Response #
{
"status": 400,
"message": "Invalid Parameters!",
"data": false
}