Developers Corner

Hello Developers👋, Want to use Tini.fyi for your application ? Here is quick guide to make it possible with our APIs.

Generate API token

Click the above button to generate a token, and make sure to copy it from the popup because this token won't be visible afterward. However, you can regenerate a token.

Screenshot

Make request on mentioned endpoint

fetch('https://tini.fyi/api/v1/url/create', {
								method: 'POST',
								headers: {
									"Authorization": 'Bearer YOUR_TOKEN',
									"Content-Type": 'application/json'
								},
								body: JSON.stringify({
									destination: YOUR_URL,
								}),
							}).then((response) => response.json())
								.then((data) => console.log(data))
								.catch((error) => console.error(error))
							
Screenshot

Advanced options

  • You can pass alias option in body for make short url with your favorite Alias.
  • If you won't pass alias then it will be auto generated by system.
  • If your alias is already taken by someone then then you will get error409 status code.
Screenshot

Response on success !

{
								"status": "success",
								"data": {
									 "id": "b6a07635-dfaf-4eef-b818-705549fd3735",
									"destination": "https://app.tini.fyi",
									"shortUrl": "https://tini.fyi/new",
									"createdAt": "2023-04-29T05:15:58.085Z"
							}
Screenshot