> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobilerun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a SOCKS5 user

> Creates a SOCKS5 credential, optionally bound to a proxy for dedicated routing. Username and password are generated when omitted.



## OpenAPI

````yaml /api-reference/mobilerun-proxy.yaml post /connect/users
openapi: 3.1.0
info:
  title: Mobilerun Proxy
  version: v1
servers:
  - url: https://api.mobilerun.ai
    description: Droidrun Cloud API
security:
  - bearerAuth: []
paths:
  /connect/users:
    post:
      tags:
        - Users
      summary: Create a SOCKS5 user
      description: >-
        Creates a SOCKS5 credential, optionally bound to a proxy for dedicated
        routing. Username and password are generated when omitted.
      operationId: CreateUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserWithSecret'
          description: The created user, including its password.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - UserIDHeader: []
        - OwnerIDHeader: []
          UserIDHeader: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun();

            const user = await client.connect.users.create();

            console.log(user.id);
        - lang: Python
          source: |-
            from mobilerun_sdk import Mobilerun

            client = Mobilerun()
            user = client.connect.users.create()
            print(user.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient()\n\tuser, err := client.Connect.Users.New(context.TODO(), mobileruncloud.ConnectUserNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", user.ID)\n}\n"
        - lang: CLI
          source: mobilerun-cloud connect:users create
components:
  schemas:
    CreateUserRequest:
      properties:
        password:
          description: >-
            Desired SOCKS5 password, 1-255 bytes (RFC 1929). Generated when
            omitted.
          maxLength: 255
          minLength: 1
          type: string
        proxyId:
          description: Proxy to bind the user to for dedicated routing.
          format: uuid
          type: string
        username:
          description: >-
            Desired SOCKS5 username, 1-255 bytes (RFC 1929). Generated when
            omitted.
          maxLength: 255
          minLength: 1
          type: string
      type: object
    UserWithSecret:
      allOf:
        - $ref: '#/components/schemas/User'
        - properties:
            password:
              type: string
          required:
            - password
          type: object
      description: >-
        A SOCKS5 user including its password. Returned only on create and
        single-user reads.
    User:
      description: A SOCKS5 credential without its password.
      properties:
        createdAt:
          format: date-time
          type: string
        id:
          format: uuid
          type: string
        proxyId:
          description: >-
            The proxy this user routes to (dedicated routing), or null if
            unbound.
          format: uuid
          nullable: true
          type: string
        username:
          type: string
      required:
        - id
        - username
        - createdAt
      type: object
    ErrorResponse1:
      description: A Problem Details (RFC 7807-style) error response.
      properties:
        detail:
          description: Human-readable explanation of this occurrence.
          type: string
        errors:
          description: Per-input errors, when applicable.
          items:
            $ref: '#/components/schemas/ErrorDetail1'
          type: array
        status:
          description: HTTP status code.
          type: integer
        title:
          description: Short, human-readable summary of the error type.
          type: string
      required:
        - title
        - status
        - detail
        - errors
      type: object
    ErrorDetail1:
      description: A single error, locating an offending input where applicable.
      properties:
        location:
          description: Path to the offending input, e.g. "body.proxyId".
          type: string
        message:
          description: Human-readable description of this error.
          type: string
        value:
          description: The offending value, when available.
      required:
        - location
        - message
      type: object
  responses:
    BadRequest:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse1'
      description: The request was invalid.
    Unauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse1'
      description: >-
        The X-User-ID header was missing or invalid, or a present X-Owner-Id
        header was not a uuid.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: Bearer token via Authorization header

````