Create short link
Require authorization with a webdo.com user account.
Authorization header is: Bearer <token>
var req = { method: 'POST',
url: 'https://keydocument.q-ube.com/shorts/createslink', headers: {'Content-Type': "application/json; charset=utf-8", 'Authorization': "Bearer "+ <hkey>}, data:<new link> };
where data should be defined like next:
Add "appkey" to data if the authorization is created with an application key.
data: {
link:<link url>,
ltype:<link type>,
cid:<campaign ID>,
extra:{
pem:<true/false>,
pid:<true/false>
}
}
link type values are j, e, r:
- j - just link, no action is trigered
- e - used to add an empty pixel email image to check email is open
- r - used to record action when used ( record info to a logfile )
extra fields:
- pem - attach and record an email address that is used to identify the user (email campaigns)
- pid - attach the campaign ID to the link for further checkup on destination website
Response is a JSON:
check for data.response.data[0]
{
l:<url>,
t:<link type>,
cid:<campaign ID>,
e:{pem:true/false, pid:true/false}
}
If t = "j" ; cid and e are not required as no action is trigered except redierect to "l" url.