简体   繁体   中英

How to create Firebase Dynamic Links from the Admin SDK

Instead of creating a dynamic link inside the iOS app, is it possible to create dynamic links directly from the Admin SDK? For example, I listen for the creation of a document in the Admin SDK, and then create a dynamic link with its path.

Thanks!

正如您从Firebase Admin SDK 文档中看到的那样,使用动态链接并不是它可以做的许多事情之一。

It's possible @ken, Firebase's docs just refer to it as "Email Action Links". Now it depends on what you want to do with the dynamic links...

If your use case falls under one of these 3 generic categories (email password links / sign in / reset links), it's done for you. https://firebase.google.com/docs/auth/admin/email-action-links

If you want to go beyond that, the API specifies an ActionCodeSettings field which has the parameter dynamicLinkDomain . You may be able to send a dynamic link like this anyway, even if its not explicitly handled for you.

Alternatively, you could make the dynamic links manually via this method, and write the link out in your Admin SDK area (whether thats Node.js or where-ever you're listening for document creation). https://firebase.google.com/docs/dynamic-links/create-manually

You can do this but not directly from the Admin API. BigMcLargeHuge's answer is correct, but the documentation page from that answer doesn't explain how to generate short links (which is often more desirable).

The documentation that includes short links is here: https://firebase.google.com/docs/dynamic-links/rest

You just have to make a post request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM