A Reseller only service Requires Advanced Reseller API This command will update the activation status of a sub account under a dual brand or white label provider account.
https://api.txtlocal.com/update_user_status/
<?php $data = [ 'apiKey' => 'Your API Key', 'user_id' => '12345', 'status' => '0', ]; // Send the POST request with cURL $ch = curl_init('https://api.txtlocal.com/update_user_status/'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); // Process your response here echo $response;
<?php $data = [ 'apiKey' => 'Your API Key', 'user_id' => '12345', 'status' => '0', ]; $data = http_build_query($data); // Send the GET request with cURL $ch = curl_init('https://api.txtlocal.com/update_user_status/?' . $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); // Process your response here echo $response;
user_id | ID of the user you wish to update the activation status of. Found in get_users |
---|---|
status | The new activation status. 0 for deactivated, 1 for activated. |
Login Parameters (Additional Information) | |
apiKey | You can create these in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address. |
{ "user_status": 0, "status": "success" }
<?xml version="1.0" encoding="UTF-8" ?> <response> <user_status>0</user_status> <status>success</status> </response>
Error Codes | |
172 | No reseller account found |
---|---|
211 | This endpoint requires the advanced reseller API. |
212 | No status specified. |
213 | Status invalid. |