Socket
Socket
Sign inDemoInstall

py-firebase-dynamic-links

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    py-firebase-dynamic-links

Python client for Firebase Dynamic Links API


Maintainers
1

Readme

Simple python client to generate Firebase Dynamic Links. It allows to use a custom domain and fields for generate links for android and ios.

Requirements

Installation

pip install py-firebase-dynamic-links

Usage

from firebase_dynamic_links import DynamicLinks

api_key = 'your_api_key'
domain = 'example.page.link'
timeout = 10
dl = DynamicLinks(api_key, domain, timeout) # or DynamicLinks(api_key, domain)
params = {
    "androidInfo": {
        "androidPackageName": 'packagename',
        "androidFallbackLink": 'fallbacklink',
        "androidMinPackageVersionCode": '1'
    },
}
# dl.generate_dynamic_link(url_to_redirect, create_short_url, params) or
# dl.generate_dynamic_link(url_to_redirect)
short_link = dl.generate_dynamic_link('http://google.es', True, params) #https://example.page.link/h77c
  • api_key: Key from firebase console
  • domain: Domain uri prefix created in firebase console. For example example.page.link or your custom domain.
  • timeout: Timeout for the api call
  • params: Dictionary of optional params. For example:
{
    "androidInfo": {
      "androidPackageName": string,
      "androidFallbackLink": string,
      "androidMinPackageVersionCode": string
    },
    "iosInfo": {
      "iosBundleId": string,
      "iosFallbackLink": string,
      "iosCustomScheme": string,
      "iosIpadFallbackLink": string,
      "iosIpadBundleId": string,
      "iosAppStoreId": string
    }
}

More params available here

Reference

https://firebase.google.com/docs/dynamic-links/rest
https://firebase.google.com/docs/reference/dynamic-links/link-shortener

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc