You can use this simple URL shortener microservice for your project by fetching this api. All data sent will be in JSON format.
/api/new/[yourURL]
Ex: https://url.glitch.me/api/new/glitch.com
Add the short url on to the end of this api.
Ex: https://url.glitch.me/ByWa0WCUb
You can view the list of shortened URL's with the /all api endpoint.