{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/uri/anywhere/generate","auth":"optional","settings":"587568fccf38030f005e3f39","results":{"codes":[{"name":"","code":"{\n    \"anywhereUrl\": \"https://redirect.viglink.com?key={YOUR API KEY}&u=https%3A%2F%2Fwww.walmart.com%2Fip%2F105218827\"\n}","language":"json","status":200},{"name":"","code":"{\n    \"message\": \"Missing request parameter\",\n    \"errors\": [\n        {\n            \"resource\": \"Request\",\n            \"field\": \"key\",\n            \"code\": \"missing_field\",\n            \"message\": \"Required String parameter 'key' is not present\"\n        }\n    ],\n    \"timestamp\": 1607984244572\n}","language":"json","status":400},{"code":"{\n    \"message\": \"Unable to generate redirect URL for given url: www.google.com\",\n    \"timestamp\": 1607984409080\n}","language":"text","status":500}]},"params":[{"name":"u","type":"string","default":"","desc":"unaffiliated url that is resolved to when generating redirect url","required":true,"in":"query","ref":"","_id":"5fd7e4f9b60d01001875ec08"},{"name":"key","type":"string","default":"","desc":"api key that is attributed to when generating redirect url","required":true,"in":"query","ref":"","_id":"5fd7e4f9b60d01001875ec07"},{"name":"fbu","type":"string","default":"null","desc":"fallback url to go if \"u\" url cannot beat the bid floor","required":false,"in":"query","ref":"","_id":"606dfdae0c01e70050dc25a8"},{"name":"bf","type":"string","default":"null","desc":"bid floor for the fallback url","required":false,"in":"query","ref":"","_id":"606dfdae0c01e70050dc25a9"}],"examples":{"codes":[{"code":"<?php\n$ch = curl_init(\"https://viglink.io/uri/anywhere/generate?u=https://www.walmart.com/ip/105218827&key={YOUR API KEY}\");\n\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($ch);\n\ncurl_close($ch);","language":"php"},{"code":"require 'httparty'\n\nurl = \"https://viglink.io/uri/anywhere/generate?u=https://www.walmart.com/ip/105218827&key={YOUR API KEY}\"\n\nresponse = HTTParty.get(url)","language":"ruby"},{"code":"curl -i -X GET 'https://viglink.io/uri/anywhere/generate?u=https://www.walmart.com/ip/105218827&key={YOUR API KEY}'","language":"curl"}]},"method":"get"},"next":{"description":"","pages":[]},"title":"Building redirect URLs","type":"endpoint","slug":"building-redirect-urls","excerpt":"generate a redirect link given an unaffiliated URL","body":"","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5fd7e4f9b60d01001875ec02","createdAt":"2020-12-14T22:19:37.641Z","user":"568af6d197d8960d0012ab7d","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Anywhere","slug":"anywhere","order":6,"from_sync":false,"reference":false,"_id":"5fd7d79553f64b005e2de7c3","createdAt":"2020-12-14T21:22:29.227Z","version":"568af725176a6c0d00a29ec7","project":"568af724176a6c0d00a29ec4","__v":0},"version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["568af725176a6c0d00a29ec8","56d9d397337fd11300d6a3e3","56d9d4287222d50b0070160b","56f424307ea0091700f63ac5","56f45babcb0dce29005a8e85","5739e5836c5ba134007a197d","57717aee3dd24019004c9122","5771b5d8c755ca0e00617d7d","579639964913990e001a5911","57e57e7df3d7fc0e009c5119","587569b6f4483a0f00d2e6b8","5ca3c2274439e800149daf96","5fd7d79553f64b005e2de7c3","5fe2422ee0a887014f44a422"],"_id":"568af725176a6c0d00a29ec7","project":"568af724176a6c0d00a29ec4","releaseDate":"2016-01-04T22:50:13.289Z","__v":14,"createdAt":"2016-01-04T22:50:13.289Z"},"project":"568af724176a6c0d00a29ec4","__v":7,"parentDoc":null}

getBuilding redirect URLs

generate a redirect link given an unaffiliated URL

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

u:
required
string
unaffiliated url that is resolved to when generating redirect url
key:
required
string
api key that is attributed to when generating redirect url
fbu:
stringnull
fallback url to go if "u" url cannot beat the bid floor
bf:
stringnull
bid floor for the fallback url

Examples


Result Format


User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}