Use this endpoint to add new site to Brid.tv.
apiv2/users/add/.json
This method is type of POST and will not receive any GET parameters.
Parameters:
Name | Type | Description |
---|---|---|
data[User][username] *required | integer | |
data[User][password] *required | string | password |
data[User][group_id] *required | string | User group Id |
data[User][country] *optional | string | User country |
data[User][displayname] *optional | string | Display name |
data[User][company] *optional | string | Company name |
data[User][partner_ids] *required | string | Array of partner ids |
<?php
require_once('lib/BridApi.php');
try {
$api = new BridApi(array('auth_token'=>'your_auth_token'));
$post = array(
'data[User][username]' => 'EMAIL', //enter valid user email
'data[User][password]' => 'PASSWORD', // set to your own password
'data[User][group_id]' => 12, //id of the user group, see below
'data[User][country]' => 'RS', //contry code, see below
'data[User][displayname]' => 'DISPLAYNAME', //display of your user
'data[User][company]' => 'Brid.tv', //company name
'data[User][partner_ids]' => [12579, 12580], //list of partner ids
);
$return = $api->post(['users', 'add'], $post);
print_r($return);
}
catch(Exception $e) {
echo $e->getMessage();
}
?>
Name | Type |
---|---|
10 | string(11) "Contributor" |
11 | string(14) "Limited Editor" |
12 | string(14) "Special Editor" |
30 | string(6) "Editor" |
50 | string(5) "Admin" |
** You can find list of the countries and their codes on the following URL: https://www.pastiebin.com/5d662fd3ef474
BridApi.php is a small library we provide in our git repository which allows you to quick-start your implementation so we advise you to use it. These examples are made with this library in mind. Make sure to substitute and use your own authorization token and site data when trying out these examples.