---
title: "Open Session"
source_url: https://docs.rapyd.net/en/open-session.html
lang: en
---

# Open Session

Open a session for a Deposit or Withdraw action.

This method authenticates the [POS](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_pos "Point of Sale") and returns `operation_id` and `token_id`, which are required for [Deposit](https://docs.rapyd.net/en/deposit.md "Deposit") and [Withdraw](https://docs.rapyd.net/en/withdraw.md "Withdraw").

This method requires a one-time password. A session is valid for one Deposit or Withdraw action.

> **Note:**
>
> The base URL for the POS production environment is **https://pos.rapyd.net**. It requires its own access key, which is different from the access key for the Payment API. See [Accounts and Credentials](https://docs.rapyd.net/en/accounts-and-credentials.md "Accounts and Credentials"). To set up a sandbox environment for the POS API, contact **[Rapyd Client Support](https://support.rapyd.net)**.

### Parameters

### Request Path Parameters

- - otp_code
  - User one-time password code.
- - pos_id
  - ID of the point-of-sale location. UUID

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - phone_number
  - Phone number of the Rapyd wallet in E.164 format.

### Response Parameters

- - accounts
  - Describes the accounts within the Rapyd wallet. Each object contains the following fields:

    - - account_id
      - ID of the currency account. UUID.
    - - account_currency
      - Currency of the account. 3-letter ISO 4217 code.
    - - account_alias
      - Alias for the account.
    - - account_balance
      - Balance in the account.
- - operation_id
  - ID of the operation. UUID.
- - token_id
  - Token for further operations.

- /v1/pos/login/{pos_id}/{otp_code}

- Open Session
- ```curl
  curl -X post
  https://sandboxpos.rapyd.net/v1/pos/login/ac409157-0e14-11e7-8115-0ef1982c1e4a/123456879
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'idempotency: your-idempotency-parameter-here'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "0",
          "status": "SUCCESS",
          "message": "",
          "operation_id": "1e00ac82-acf0-47f6-9c8e-29049e394aea"
      },
      "data": {
          "token_id": "0c8a15aa-52a0-49bd-9091-b6ce2ee5c67a",
          "operation_id": "90e32195-4a78-4e9e-8459-cd1f7719132b",
          "accounts": [
              {
                  "account_id": "78fea8f4-7779-11e7-9273-0ef1982c1e4a",
                  "account_currency": "GBP",
                  "account_alias": "GBP",
                  "account_balance": 955
              }
          ]
      }
  }
  ```
