Search code examples
actions-on-googleapi-ai

Emoji in SimpleResponse


https://stackoverflow.com/a/45890852/8413869

from the above answer, I got to know that emojis can be passed in Button formatted text.

But I am looking for emojis like google have it in Bubble response. enter image description here

I tried to pass unicode in simple response but no luck.

....."data": {
        "google": {
            "expectUserResponse": true,
            "richResponse": {
                "items": [
                    {
                        "simpleResponse": {
                            "ssml": "<speak>Hello. How are you ? </speak>",
                            "displayText": "Hello U+1F600., how are you ? "
                        }
                    }
                ],
                "suggestions": [],
                "linkOutSuggestion": {}
            }
        }
    }.....

Is there any way to do this ?


Solution

  • I made it work with this uni code " \uD83D\uDE00" I just copied emoji from https://emojipedia.org/ which gave me this unicode