1

I'm working on a project that requires generating short URLs for links with numerous query parameters. I've attempted to achieve this using Firebase Dynamic Links, but I've encountered some issues. I'm seeking your expertise to help resolve these problems.

I have a lengthy URL with several query parameters, like this:

https://example.com/p/h2b883?params1=value&params2=value&params3=225555

I want to replace this long URL with a shorter one using Firebase Dynamic Links.

Here's the code I've used:

httpService
.post(process.env.DYNAMIC_LINK_API, {
    longDynamicLink:
        'https://domain.page.link/?link=' +
        'https://example.com/p/h2b883?params1=value&params2=value&params3=225555',
})
.toPromise()
.then((res) => {
    return res.data.shortLink;
})

The code provided returned the following result:

{
  shortLink: 'https://domain.page.link/vyLMGdsqdsqrjruVGA87',
  warning: [
    {
      warningCode: 'UNRECOGNIZED_PARAM',
      warningMessage: "Unrecognized param 'params2'. [https://firebase.google.com/docs/dynamic-links/create-manually#ddl_parameters]"
    },
    {
      warningCode: 'UNRECOGNIZED_PARAM',
      warningMessage: "Unrecognized param 'params3'. [https://firebase.google.com/docs/dynamic-links/create-manually#ddl_parameters]"
    }
  ],
  previewLink: 'https://domain.page.link/vyLMG2hdsqdqVGA87?d=1'
}

The issue is that it generates a URL perfectly, but only with one query parameter, specifically the first one. It disregards the others that are displayed in the warning message.

Thank you in advance for your assistance!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.