kamali25 | Posts: 11

Virtual Room

0 votes

Hi,

Trying to configure virtual room via create package api call. For enabling it what do i need to pass in the request_body of the create package api call.

Thanks


Approved Answer
Duo_Liang | Posts: 3776

Reply to: Virtual Room

1 votes

Hi Kamali,

 

The Virtual Room related settings are exposed at both package JSON as well as "GET /api/packages/{packageId}/virtual-room/config" endpoint, but I would suggest to only turn on the feature at the initial package creation call, and invoke an additional API to set up other settings:
API1: Create the transaction and leave it at DRAFT status

POST /api/packages

{
  "roles": [
    {
      "id": "Owner",
      "name": "Owner",
      "signers": [
        {
          "email": "sender's email",
          "firstName": "Duo",
          "lastName": "Liang",
          "company": "OneSpan Sign",
          "id": "Owner"
        }

      ]
    }
,
    {
      "id": "Signer1",
      "name": "Signer1",
      "signers": [
        {
          "email": "[email protected]",
          "firstName": "1.firstname",
          "lastName": "1.lastname",
          "company": "OneSpan Sign",
          "id": "Signer1"
        }
      ]
    }
  ],
  "documents": [
    {
      "approvals": [
        {
          "role": "Signer1",
          "fields": [
            {
              "page": 0,
              "top": 100,
              "subtype": "FULLNAME",
              "height": 50,
              "left": 100,
              "width": 200,
              "type": "SIGNATURE"
            }
          ]
        }
      ],
      "name": "Test Document"
    }
  ],
  "name": "Example Package",
  "type": "PACKAGE",
  "language": "en",
  "emailMessage": "",
  "description": "New Package",
  "autocomplete": true,
  "virtualRoom": true,
  "status": "DRAFT"
}

Note:

1. Explicitly add the virtual room host and specify the role ID, in our case, the virtual room host is the transaction owner (virtual room host could be any email as long as they have an OneSpan Sign sender profile)

2. Only turn on the flag "virtualRoom" : true at this point

 

API2: Set up Virtual Room Settings

PUT /api/packages/{packageId}/virtual-room/config

{

    "video": true,

    "videoRecording": false,

    "startDatetime": "2022-01-13T03:14:00.000Z",

    "hostUid": "Owner",

    "sessionTime": 60,

    "sessionTimeoutWarning": 15,

    "adHocCobrowsing": false

}

 

API3: Send the Transaction

PUT /api/packages/{packageId}

{"status":"SENT"}

 

Duo


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off