如何使用Firebase缩短网址

时间:2019-03-28 12:55:47

标签: firebase-dynamic-links url-shortener google-url-shortener

我正在使用以下POST请求来缩短网址: https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=(mykey)

请求正文:

{
   "longDynamicLink": "http://abcd.xyz.com/?custID=72719499&tID=20565014&Type=SC&idf=ABC&mobLinkID=95&tstamp=1540805508444",
   "suffix": {
     "option": "SHORT"
   }
}

收到的回复是:

{
    "error": {
        "code": 400,
        "message": "Long link is not parsable: http://abcd.xyz.com/?custID=72719499&tID=20565014&Type=SC&idf=ABC&mobLinkID=95&tstamp=1540805508444 [https://firebase.google.com/docs/dynamic-links/rest#create_a_short_link_from_parameters]",
        "status": "INVALID_ARGUMENT"
    }
}

请提出一种解决方法。

0 个答案:

没有答案