How to use 'ofl' parameter using Dynamic link rest api

316 views
Skip to first unread message

Harish Moyal

unread,
Jul 13, 2020, 11:20:39 AM7/13/20
to Firebase Google Group
Hi,

I am trying to achieve a different behaviour for my dynamic links on desktop (Windows/Linux/Mac etc). I am generating the dynamic links using REST api given here https://firebase.google.com/docs/reference/dynamic-links/link-shortener. As per documentation a parameter named 'ofl' can be specified to achieve a different behaviour of a dynamic link on Desktop. 

I am not able to create such a link with ofl parameter because in the documentation it is not mentioned where to place the ofl parameter in the request body. I tried placing it at the following places:

1. Inside dynamicLinkInfo i.e dynamicLinkInfo.ofl
2. At the root
3. Inside androidInfo i.e. androidInfo.ofl

But every time I am getting the error. For eg for case 1 I am getting: Invalid JSON payload received. Unknown name \"ofl\" at 'dynamic_link_info.android_info': Cannot find field."

Sample request body:

{
  "dynamicLinkInfo": {
    "domainUriPrefix": "https://mycustomdomain.page.link/",
    "androidInfo": {
      "androidPackageName": "com.abc.xyz",
      "androidFallbackLink": "https://www.google.com"
    },
  },
  "suffix": {
    "option": "UNGUESSABLE"
  }
}

Please help.

Regards,
Harish Moyal

Arthur Thompson

unread,
Jul 13, 2020, 1:26:31 PM7/13/20
to fireba...@googlegroups.com
Hi Harish,

Could you try:

{
  "dynamicLinkInfo": {
  ...
    "androidInfo": {...},
    "desktopInfo": {
      "desktop_fallback_link": "https://www.mydesktopsite.com"
    },
  ...
  }
}

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/f18d710e-f8cc-4b51-b695-81c4bbf4e6f8n%40googlegroups.com.

Harish Moyal

unread,
Jul 14, 2020, 3:55:47 AM7/14/20
to fireba...@googlegroups.com
Hi Arthur Thompson,

Thanks for the reply. The desktop_fallback_link works perfectly as expected. Wondering why this field is not available in the documentation for Dynamic links on Firebase documentation.

Regards,
Harish Moyal

You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/tDhb_wRRn9E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CANXaM1oJmAR6hozA%2BfxAye5rm15U03fOhK4p8BnJp%3DqK%2B-9rFg%40mail.gmail.com.

Arthur Thompson

unread,
Jul 14, 2020, 9:23:01 AM7/14/20
to fireba...@googlegroups.com
Hi Harish,

Thanks for calling that out, that field should be in the docs I'm working adding it.

Reply all
Reply to author
Forward
0 new messages