An endpoint service for twemoji. Makes possible to get svg file with name. Uses GET method.
- Lightweight implementation
- Simple to use
- Open source emojis
It is very easy to install twemoji endpoint into a server. You can also try our demo endpoint: https://api.allybros.com/twemoji/ However, there is no guarantee that this endpoint will be maintained. If you want to use this kind of solution, please use the source code and host the endpoint on your own server.
For hosting twemoji endpoint on your own server, it is enough to place resources directory and index.php file into a public accessible directory of an php web server.
Calling twemoji endpoint is very simple. You only call the endpoint with one query parameter.
You need to set a name parameter in order to retrieve SVG emoji. It is very simple. Emoji names can be found here: https://unicode.org/emoji/charts/full-emoji-list.html Use CLDR Short names. For space character, use '-'.
GET https://api.allybros.com/twemoji?name=grinning-face
Twemoji endpoint returns the svg content as response. This allows you to use twemoji endpoint as a dynamic asset url.
EndPoint returns a json when an error is occurred. Youy- can see an example below:
For Invalid Name:
{"status":40, "message":"Invalid name."}
- Php
- Curl