JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun();
const user = await client.connect.users.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(user.id);from mobilerun_sdk import Mobilerun
client = Mobilerun()
user = client.connect.users.update(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(user.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
)
func main() {
client := mobileruncloud.NewClient()
user, err := client.Connect.Users.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
mobileruncloud.ConnectUserUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", user.ID)
}mobilerun-cloud connect:users update \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26ecurl --request PATCH \
--url https://api.mobilerun.ai/connect/users/{id} \
--header 'Content-Type: application/json' \
--data '
{
"proxyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/connect/users/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'proxyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://api.mobilerun.ai/connect/users/{id}")
.header("Content-Type", "application/json")
.body("{\n \"proxyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/connect/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"proxyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"proxyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}Users
Update a SOCKS5 user
Rebind the user to a different proxy (or detach it by passing null).
PATCH
/
connect
/
users
/
{id}
JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun();
const user = await client.connect.users.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(user.id);from mobilerun_sdk import Mobilerun
client = Mobilerun()
user = client.connect.users.update(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(user.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
)
func main() {
client := mobileruncloud.NewClient()
user, err := client.Connect.Users.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
mobileruncloud.ConnectUserUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", user.ID)
}mobilerun-cloud connect:users update \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26ecurl --request PATCH \
--url https://api.mobilerun.ai/connect/users/{id} \
--header 'Content-Type: application/json' \
--data '
{
"proxyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/connect/users/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'proxyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://api.mobilerun.ai/connect/users/{id}")
.header("Content-Type", "application/json")
.body("{\n \"proxyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/connect/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"proxyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"proxyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"status": 123,
"title": "<string>"
}Body
application/json
Proxy to rebind to, or null to detach. Omit to leave the user's current binding unchanged — only an explicit null detaches.
Was this page helpful?
⌘I