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

# Get User Device

> Retrieve user device via the Junction API. Requires authentication with your team API key.

<RequestExample>
  ```bash Shell theme={null}
  curl --request GET \
       --url {{BASE_URL}}/v2/user/{user_id}/device/{device_id} \
       --header 'Accept: application/json' \
       --header 'x-vital-api-key: <API_KEY>'
  ```

  ```python Python theme={null}
  from junction import Junction
  from junction.environment import JunctionEnvironment

  client = Junction(
      api_key="YOUR_API_KEY",
      environment=JunctionEnvironment.SANDBOX,
  )

  data = client.user.get_device("<user_id>", "<device_id>")
  ```

  ```typescript TypeScript theme={null}
  import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";

  const client = new JunctionClient({
      apiKey: "YOUR_API_KEY",
      environment: JunctionEnvironment.Sandbox,
  });

  const data = await client.user.getDevice({
      userId: "<user_id>",
      deviceId: "<device_id>",
  });
  ```

  ```java Java theme={null}
  import com.junction.api.Junction;
  import com.junction.api.core.Environment;

  Junction client = Junction.builder()
      .apiKey("YOUR_API_KEY")
      .environment(Environment.SANDBOX)
      .build();

  var data = client.user().getDevice("<user_id>", "<device_id>");
  ```

  ```go Go theme={null}
  import (
      "context"

      junction "github.com/junction-api/junction-go"
      "github.com/junction-api/junction-go/client"
      "github.com/junction-api/junction-go/option"
  )

  c := client.NewClient(
      option.WithApiKey("YOUR_API_KEY"),
      option.WithBaseURL(junction.Environments.Sandbox),
  )

  response, err := c.User.GetDevice(context.TODO(), &junction.GetDeviceUserRequest{
      UserId:   "<user_id>",
      DeviceId: "<device_id>",
  })
  if err != nil {
      return err
  }
  fmt.Printf("Received data %s\n", response)
  ```
</RequestExample>


## OpenAPI

````yaml GET /v2/user/{user_id}/device/{device_id}
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.495
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /v2/user/{user_id}/device/{device_id}:
    get:
      tags:
        - user
      summary: Get User Device
      operationId: get_user_device_v2_user__user_id__device__device_id__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: >-
              User id returned by vital create user id request. This id should
              be stored in your database against the user and used for all
              interactions with the vital api.
        - name: device_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Device Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientFacingDevice'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ClientFacingDevice:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          type: string
          format: uuid
          title: User Id
        provider:
          type: string
          title: Provider
        source_type:
          type: string
          enum:
            - unknown
            - phone
            - watch
            - app
            - multiple_sources
            - fingerprick
            - cuff
            - manual_scan
            - automatic
            - insulin_pump
            - scale
            - chest_strap
            - ring
            - lab
            - exercise_machine
            - earphone
          title: Source Type
          description: ℹ️ This enum is non-exhaustive.
        app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: App Id
        device_manufacturer:
          anyOf:
            - type: string
            - type: 'null'
          title: Device Manufacturer
        device_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Device Model
        device_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Device Version
        device_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Device Id
      type: object
      required:
        - id
        - user_id
        - provider
        - source_type
      title: Device Data
      example:
        device_id: F-31-A4C138BB9EF5
        device_manufacturer: Fitbit
        device_model: Aria Air
        device_version: '1.0'
        id: 00000000-0000-0000-0000-000000000000
        provider: fitbit
        source_type: scale
        user_id: 00000000-0000-0000-0000-000000000000
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````