Generate redirection URL

Create a shortURL for channel URL.

Parameter

Accessible via URL https://api.channel.io/open/v5/redirections and HTTP POST

ParameterExampleRequiredDescriptionParameter Type
urlhttps://channeldomain.channel.io/userchats-123124RequiredURL must be channel URL. URL must contains channel's domain(ex: https://{your_domain}.channel.io)Form
expirationPT30MOptionalIf this property is null, the expiration is set to 1 minute(PT1M).Form

Example

POST https://api.channel.io/open/v5/redirections

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
  }
}