Message with link url encoding

API Endpoint(s) and/or Zoom API Event(s)
POST /im/chat/messages
Content is simple card with link element:

{
  "type": "message",
  "text":  "simple text",
  "link": "https://example/#objectName"
}

Description
When message appears in Zoom Chat client, it replaces # by %23. Because of this url becomes invalid.

Error?
No

How To Reproduce
Just send a card with Link button, url must contain #.

My question is: How can I post a Link button to escape # encoding?

Hi @tolikbotov , try using Markdown to avoid the encoding: https://marketplace.zoom.us/docs/guides/team-chat-apps/customizing-messages/message-with-markdown/#render-in-zoom-chat

Hello, @gianni.zoom .
Should I use markdown inside Link property?
Example:

{
  "type": "message",
  "text":  "simple text",
  "link": "*https://example/#objectName*"
}

Do you mean this

<https://zoom.us>

I prefer to specify a text, not just url. Because url may be too long and it doesn’t look pretty.

Hi @tolikbotov , yes this is what I meant. You can still add a text. Were you able to try it?

You can still add a text.

@gianni.zoom Can I add a text along with url? Something like this

[Some important]([htttp://](https://devforum.zoom.us/t/message-with-link-url-encoding/85138/4))
?

Yes I believe you should be able to! Were you able to try it?

I will try. Thank you.

@gianni.zoom I made a post to https://api.zoom.us/v2/im/chat/messages?
with content:

{
	"robot_jid": "v1....32@conference.xmpp.zoom.us",
	"account_id": "G...-w",
	"content": {
		"body": [{
			"text": "View in SugarCRM  [crmName](https://s...ugarcrm.com/#Opportunities/ea..de)",
			"type": "message"
		}]
	},
	"is_markdown_support": true
}

But output is not what i expected:

I tried another approach:

<https://sugarcrm.com/#Opportunities|SugarCRM>

But render replaces # as it did before:

If I wrap url into *, it stops render it as url link:

Hi @tolikbotov , thanks for sharing what you tried back! I’ll look into this some more for a solution, but in the interim, transforming the link with a link shortener like bitly could be a solid option for now.

To post a Link button that can escape # encoding, you can use URL encoding to convert the “#” character to “%23”. Here’s an example of how you can modify the payload for the POST request to include a properly encoded URL:

perlCopy code

{
  "type": "message",
  "text":  "simple text",
  "link": "https://example/%23objectName"
}

By using “%23” instead of “#” in the URL, the link will be properly encoded and will not be replaced by the Zoom Chat client. Make sure to properly encode any special characters in your URLs to avoid similar issues. For you can visit my website that link is here.

1 Like

@asifa56674 thank you for the response. Did you try it by yourself? I’ve already tried that, and result is the same, when I leave # as is.