public function assignToApplication($userName) { $restApi = new RestAPI(); $sendData = array("account_id" => self::ID, "api_key" => self::API_KEY, "user_name" => $userName, "application_name" => "staging-bottel"); $apiResult = $restApi->CallAPIGuzzle("GET", "https://api.voximplant.com/platform_api/BindUser/", $sendData); $result = json_decode($apiResult); if ($result->{"result"} == 1) { return true; } else { return false; } }