JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun();
const user = await client.connect.users.create();
console.log(user.id);from mobilerun_sdk import Mobilerun
client = Mobilerun()
user = client.connect.users.create()
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.New(context.TODO(), mobileruncloud.ConnectUserNewParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", user.ID)
}mobilerun-cloud connect:users createcurl --request POST \
--url https://api.mobilerun.ai/connect/users \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>",
"proxyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/connect/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'password' => '<string>',
'proxyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'username' => '<string>'
]),
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.post("https://api.mobilerun.ai/connect/users")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\",\n \"proxyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"username\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/connect/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"password\": \"<string>\",\n \"proxyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"username\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"password": "<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>"
}Users
Create a SOCKS5 user
Creates a SOCKS5 credential, optionally bound to a proxy for dedicated routing. Username and password are generated when omitted.
POST
/
connect
/
users
JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun();
const user = await client.connect.users.create();
console.log(user.id);from mobilerun_sdk import Mobilerun
client = Mobilerun()
user = client.connect.users.create()
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.New(context.TODO(), mobileruncloud.ConnectUserNewParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", user.ID)
}mobilerun-cloud connect:users createcurl --request POST \
--url https://api.mobilerun.ai/connect/users \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>",
"proxyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/connect/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'password' => '<string>',
'proxyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'username' => '<string>'
]),
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.post("https://api.mobilerun.ai/connect/users")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\",\n \"proxyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"username\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/connect/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"password\": \"<string>\",\n \"proxyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"username\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"password": "<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>"
}Body
application/json
Desired SOCKS5 password, 1-255 bytes (RFC 1929). Generated when omitted.
Required string length:
1 - 255Proxy to bind the user to for dedicated routing.
Desired SOCKS5 username, 1-255 bytes (RFC 1929). Generated when omitted.
Required string length:
1 - 255Response
The created user, including its password.
Was this page helpful?
⌘I