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

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# addSession

Wallet Gateway

›

[User API](https://docs.canton.network/reference/wallet-gateway-json-rpc/specs/user-api.md)

›

addSession

User API

# addSession

JSON-RPC

[Updated 1.7.0](#history-updated-1-7-0)

POST

`JSON-RPC addSession`

## Protocol Details

Protocol
JSON-RPC

Transport
HTTP POST

Method
addSession

Parameters
1

Result
object

## Inputs

### params

Shape
object

Required
networkId, origin

`origin`
string

required

`networkId`
string

required

## Outputs

### result

Shape
object

Schema
Session

Required
accessToken, id, idp, network, rights, status

`id`
string

required

`network`
object

required

`idp`
object

required

`accessToken`
string

required

`status`
string

required

`rights`
array\[string]

required

## Related Schemas

> [accordion] params
>
> `origin`
> string
>
> required
>
> `networkId`
> string
>
> required

> [accordion] Session
>
> `id`
> string
>
> required
>
> `network`
> object
>
> required
>
> `idp`
> object
>
> required
>
> `accessToken`
> string
>
> required
>
> `status`
> string
>
> required
>
> `rights`
> array\[string]
>
> required

## History

Updated
`1.7.0`

params updated: `params`

cURL

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl \
  <JSON_RPC_URL> \
  -H 'content-type: application/json' \
  --data @- <<'EOF'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "addSession",
  "params": {
    "params": {
      "origin": "<string>",
      "networkId": "<string>"
    }
  }
}
EOF
```

Result

application/json

```json Result theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "<string>",
  "network": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "identityProviderId": "<string>",
    "auth": {
      "method": "<string>",
      "scope": "<string>",
      "clientId": "<string>",
      "audience": "<string>"
    },
    "ledgerApi": "<string>"
  },
  "idp": {
    "id": "<string>",
    "type": "<value>",
    "issuer": "<string>"
  },
  "accessToken": "<string>",
  "status": "<string>",
  "rights": [
    "<value>"
  ]
}
```
