Firebase Dynamic Links ofl parameter not working
Asked Answered
S

1

6

I was creating short dynamic links with the py-firebase-dynamic-links where we can set parameters presented here. However, there is no desktopFallbackLink parameter to be used on the REST API.

I need to set a link to open on desktop. What I am trying to do now is to create the dynamic link manually (to be able to set the ofl parameter) and to use the REST API only to generate the short link (the request payload only contains the longDynamicLink instead of the parameters)

But I may be constructing the url in the wrong way.

Here's how the url looks like at the moment:

{DYNAMIC_LINK}/?link=http.examplelink.com/confirm-account?uuid={uuid}&token={token}/&apn={package_name}&ibi={bundle_id}&ofl={desktop_link}"

example: https://my_subdomain.page.link/?link=my_deep_link?uuid={uuid}&token={token}&apn=package_name&ibi=bundle_id&aofl=desktop_link

The link that is now generated opens the correct screen both on iOS and Android (but I am not sure if uuid and token parameters are passed correctly because I haven't tested).

But on the desktop it does not open the link specified on the ofl parameter. And it only show the uuid on the url path, not even the token parameter is correctly passed.

I tried to encode the url but it made no difference.

Does anyone know where the error is or how can I set the ofl parameter correctly?

EDIT:

I now have: https://my_subdomain.page.link/?link=my_encoded_deep_link&apn=package_name&ibi=bundle_id&afl=encoded_desktop_link&d=1

With d=1 I can see that the target url encoded_desktop_link is disallowed. What does disallowed url means?

Senega answered 7/9, 2022 at 16:52 Comment(0)
P
3

You need to specify the "Allowlist URL Pattern", which can be found by clicking the 3 vertical dots next to the "New Dynamic Link" button in the Dynamic Links page of the Firebase Console.

Use a regex patterns that only allow domains you control.

Plaza answered 16/3, 2023 at 18:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.