Generate redirection URL
Create a shortURL
for channel URL.
Parameter
Accessible via URL https://api.channel.io/open/v5/redirections and HTTP POST
Parameter | Example | Required | Description | Parameter Type |
---|---|---|---|---|
url | https://channeldomain.channel.io/userchats-123124 | Required | URL must be channel URL. URL must contains channel's domain(ex: https://{your_domain}.channel.io) | Form |
expiration | PT30M | Optional | If this property is null, the expiration is set to 1 minute(PT1M). | Form |
Example
POST https://api.channel.io/open/v5/redirections
Key | Value |
---|---|
url | https://testdomain.channel.io/userchats-123dafera |
expiration | PT30M |
Response
Returns an redirection
object which includes originalUrl
, expireAt
, shortUrl
{
"redirection": {
"originalUrl" : "https://testdomain.channel.io/userchats-123dafera",
"expireAt" : 1689852828990,
"shortUrl" : "https://chta.lk/abcdefgh
}
}
Updated 12 months ago