Hi. I am building a custom app for the shortener TinyURL.com using URL Shortener, Branded Short Links & Analytics | TinyURL and keep getting a 401. I am either really close to being done or really far I would appreciate having my code looked over. I removed all default comments in case tinyurl is not jsonc compatible. TIA
Base:
{
"baseUrl": "https://api.tinyurl.com",
"headers": {
"Authorization": "Bearer {{connection.apiToken}}"
},
"response": {
"error": {
"message": "[{{statusCode}}] {{body.error}}"
}
},
"log": {
"sanitize": [
"request.headers.authorization"
]
}
}
Connections:Communication
{
"url": "https://api.tinyurl.com",
"headers": {
"Authorization": "Bearer {{parameters.apiToken}}"
},
"response": {
"metadata": {
"type": "email",
"value": "{{body.email}}"
},
"error": {
"message": "[{{statusCode}}] {{body.error}}"
}
},
"log": {
"sanitize": [
"request.headers.authorization"
]
}
}
Connections:Parameters
[
{
"name": "apiToken",
"type": "text",
"label": "TinyURL API Token",
"required": true,
"help": "[Help](https://tinyurl.com/app/settings/api)"
}
]
Modules:Communication
{
"url": "/create",
"method": "POST",
"headers": {},
"body": {
"url": "{{parameters.longUrl}}",
"alias": "{{parameters.alias}}"
},
"response": {
"output": "{{body}}"
}
}
Modules:Mappable Parameters
[
{
"name": "longUrl",
"type": "url",
"label": "Long URL",
"required": true,
"help": "[Manage](https://tinyurl.com/app/my-urls)"
},
{
"name": "alias",
"type": "text",
"label": "Alias",
"required": false,
"help": "5 to 30 characters to be included.",
"minLength": 5,
"maxLength": 30
}
]