question

Rajeev Garg avatar image
Rajeev Garg asked Phong Vu answered

Different user Id received in interactive message payload

Hi,

When the User performed User OAuth through our User App (REST API App) we captured the

owner_id that is the user_id for the User. To get the owner_id, '/restapi/oauth/token' endpoint is called with the received 'code. For a particular user the owner_id is :302755004

When the User clicks Action.Submit button in a Adaptive card(Created by our Bot App) with interactive messages we received a payload that contains the id of the user in user field as below for the same user.

1635170827878.png
Here user.id is coming as 194404355.

We require the correct userid of the user so that we can identify who initiated the action.

Could you please help us why the userIds are different and we need to do in order to get the unique userId






message
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered

Right now, the adaptive card does not send the actual extension id, we will improve and support that in the next release.

Meanwhile, you can use the work around solution as follow:

Pass the extension id (owner_id) to the card data object, when the Submit button is click, the framework will pass it back.

{
    type: "ActionSet",
    actions: [
        {
            type: "Action.Submit",
            title: "Submit",
            data: {
                path: "some_path",
                user_id: "owner_id"
            }
        }
    ]
}

// receive submit data
console.log(req.body.data.user_id)
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys