-1

I want to generate firebase deep link (short Url) for the deep link containing #, its basically angularJS routing url, so contains # symbol, but Firebase api is ignoring it.

Request URL:

        https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=abcd

Body in Json:
    {
       "longDynamicLink": "https://xyz.page.link/?link=https://test.xyz.com/backoffice/#/my_link?&activateAccountToken=abcd"
    }

I am using POSTMAN to hit this api. I am receiving following warning:

[{ 
  "shortLink": "https://xyz.page.link/VPosagWjeqHafHwSA",
  "warning": [
    {
      "warningCode": "UNRECOGNIZED_PARAM",
      "warningMessage": "Url fragments '#/my_link?&activateAccountToken=abcd' will be ignored. [https://firebase.google.com/docs/dynamic-links/create-manually#ddl_parameters]"
    }
  ],
  "previewLink": "https://xyz.page.link/VPosagWjeqHafHwSA?d=1"
}
]

Generated previewLink is only redirecting till "https://test.xyz.com/backoffice" ignoring "#/my_link"

Plz suggest how firebase api will accept link with #.

Abhishek Singh
  • 1,367
  • 1
  • 22
  • 46

1 Answers1

3

I got the solution:

we only need to encode the complete Url for which we want to create shortened Url (or Firebase Dynamic link). Then # will be converted to %23 (UTF format). This encoded Url should be passed in the request body. It will work.

Abhishek Singh
  • 1,367
  • 1
  • 22
  • 46