> ## 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.

# Create Sign-In Token

> Create or submit user sign in token via the Junction API. Requires authentication with your team API key.

Create a [Junction Sign-In Token](/wearables/sdks/authentication#junction-sign-in-token) for your mobile apps to
sign in with [Junction Mobile SDKs](/wearables/sdks/authentication).

<Info>
  Avoid requesting Junction Sign-In Token every time your mobile app relaunches.
  Your mobile app only needs to sign in once with the Junction Mobile SDK. A signed-in session is persistent on device.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
       --url {{BASE_URL}}/v2/user/{{USER_ID}}/sign_in_token \
       --header 'Accept: application/json' \
       --header 'x-vital-api-key: <API_KEY>' \
       --header 'Content-Type: application/json' \
  ```

  ```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.getUserSignInToken({ userId: "<user_id>" });
  ```

  ```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_user_sign_in_token("<user_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().getUserSignInToken("<user_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.GetUserSignInToken(context.TODO(), &junction.GetUserSignInTokenUserRequest{
      UserId: "<user_id>",
  })
  if err != nil {
      return err
  }
  fmt.Printf("Received data %s\n", response)
  ```
</RequestExample>


## OpenAPI

````yaml POST /v2/user/{user_id}/sign_in_token
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.483
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}/sign_in_token:
    post:
      tags:
        - user
      summary: Get User Sign In Token
      operationId: get_user_sign_in_token_v2_user__user_id__sign_in_token_post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSignInTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UserSignInTokenResponse:
      properties:
        user_id:
          type: string
          format: uuid
          title: User Id
        sign_in_token:
          type: string
          title: Sign In Token
      type: object
      required:
        - user_id
        - sign_in_token
      title: UserSignInTokenResponse
    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

````