Hi,
We are using User token \ Bot token to post the message using chatId.
When Bot token is used it is posted as the Bot and with User access token the message is shown that as the User posted the message.
For a particular use case we want to show the message is posted from an external user and not from Bot \ User
Is that possible to change the display name and avatar when we post the message ?
We created incoming webhooks using REST API to post the message . But it shows incoming webhook icon and name as below
Can we customize the icons and avatar ?
Thanks,
Raja
Make the body of your post like this
var body = { icon: "http://www.somedomain.com/icons/avatar.png", // publicly accessible activity: "Display name ABC", title: "Some title", body: "Your message" }
Thanks @Phong Vu ,
We can able to change the displayName but icon is still showing from incoming webhook.
We created the incoming webhook using REST API with Bot Token.
Payload for the incoming webhook :
{
"icon":"https://i.stack.imgur.com/l60Hf.png",
"activity": "Jack",
"body": "Your message",
"text": "Welcome"
}
Note: It is not working for posting message through REST API.
Is there anything we need to add to change the image\icon ?
You mentioned using incoming webhook, why did you use the REST post API? No, using the API is not possible to fake the avatar and name.
Hi @Phong Vu , We can create incoming webhooks in two ways,
Approach 1 : Through incoming webhooks app (Manual Way)
1.1 User has to manually add the app to the desired channel and share the incoming webhook.
1.2 For the webhook created in this way, the above payload is working good.
Approach 2. Through REST API (Automated way)
2.1 Bot app calls the following end point and gets the incoming webhook url in the response
POST https://platform.ringcentral.com/restapi/v1.0/glip/groups/<group-id>/webhooks
2.2 For the webhook created in this way, with the above payload the icon is not changing
Could you please help us to change the icon for the Approach 2
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder