# Firebase Dynamic Links API . shortLinks

## Instance Methods

Creates a short Dynamic Link given either a valid long Dynamic Link or

### Method Details

`create(body=None, x__xgafv=None)`

    Creates a short Dynamic Link given either a valid long Dynamic Link or
    details such as Dynamic Link domain, Android and iOS app information.
    The created short Dynamic Link will not expire.

    Repeated calls with the same long Dynamic Link or Dynamic Link information
    will produce the same short Dynamic Link.

    The Dynamic Link domain in the request must be owned by requester's
    Firebase project.

    Args:
      body: object, The request body.
        The object takes the form of:

    { # Request to create a short Dynamic Link.
        "dynamicLinkInfo": { # Information about a Dynamic Link. # Information about the Dynamic Link to be shortened.
            # [Learn
            # more](https://firebase.google.com/docs/reference/dynamic-links/link-shortener).
          "socialMetaTagInfo": { # Parameters for social meta tag params. # Parameters for social meta tag params.
              # Used to set meta tag data for link previews on social sites.
              # Used to set meta tag data for link previews on social sites.
            "socialImageLink": "A String", # An image url string. Optional.
            "socialDescription": "A String", # A short description of the link. Optional.
            "socialTitle": "A String", # Title to be displayed. Optional.
          },
          "analyticsInfo": { # Tracking parameters supported by Dynamic Link. # Parameters used for tracking. See all tracking parameters in the
              # [documentation](https://firebase.google.com/docs/dynamic-links/create-manually).
            "googlePlayAnalytics": { # Parameters for Google Play Campaign Measurements. # Google Play Campaign Measurements.
                # [Learn
                # more](https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#campaign-params)
              "utmMedium": "A String", # Campaign medium; used to identify a medium such as email or cost-per-click.
              "utmSource": "A String", # Campaign source; used to identify a search engine, newsletter, or other
                  # source.
              "utmTerm": "A String", # Campaign term; used with paid search to supply the keywords for ads.
              "utmContent": "A String", # Campaign content; used for A/B testing and content-targeted ads to
                  # differentiate ads or links that point to the same URL.
              "gclid": "A String", # [AdWords autotagging
                  # parameter](https://support.google.com/analytics/answer/1033981?hl=en); used
                  # to measure Google AdWords ads. This value is generated dynamically and
                  # should never be modified.
              "utmCampaign": "A String", # Campaign name; used for keyword analysis to identify a specific product
                  # promotion or strategic campaign.
            },
            "itunesConnectAnalytics": { # Parameters for iTunes Connect App Analytics. # iTunes Connect App Analytics.
              "ct": "A String", # Campaign text that developers can optionally add to any link in order to
                  # track sales from a specific marketing campaign.
              "pt": "A String", # Provider token that enables analytics for Dynamic Links from within iTunes
                  # Connect.
              "mt": "A String", # iTune media types, including music, podcasts, audiobooks and so on.
              "at": "A String", # Affiliate token used to create affiliate-coded links.
            },
          },
          "link": "A String", # The link your app will open, You can specify any URL your app can handle.
              # This link must be a well-formatted URL, be properly URL-encoded, and use
              # the HTTP or HTTPS scheme. See 'link' parameters in the
              # [documentation](https://firebase.google.com/docs/dynamic-links/create-manually).
              #
              # Required.
          "desktopInfo": { # Desktop related attributes to the Dynamic Link. # Desktop related information. See desktop related parameters in the
              # [documentation](https://firebase.google.com/docs/dynamic-links/create-manually).
            "desktopFallbackLink": "A String", # Link to open on desktop.
          },
          "domainUriPrefix": "A String", # E.g. https://maps.app.goo.gl, https://maps.page.link, https://g.co/maps
              # More examples can be found in description of getNormalizedUriPrefix in
              # j/c/g/firebase/dynamiclinks/uri/DdlDomain.java
              #
              # Will fallback to dynamic_link_domain is this field is missing
          "iosInfo": { # iOS related attributes to the Dynamic Link.. # iOS related information. See iOS related parameters in the
              # [documentation](https://firebase.google.com/docs/dynamic-links/create-manually).
            "iosIpadFallbackLink": "A String", # If specified, this overrides the ios_fallback_link value on iPads.
            "iosIpadBundleId": "A String", # iPad bundle ID of the app.
            "iosCustomScheme": "A String", # Custom (destination) scheme to use for iOS. By default, we’ll use the
                # bundle ID as the custom scheme. Developer can override this behavior using
                # this param.
            "iosBundleId": "A String", # iOS bundle ID of the app.
            "iosAppStoreId": "A String", # iOS App Store ID.
            "iosFallbackLink": "A String", # Link to open on iOS if the app is not installed.
            "iosMinimumVersion": "A String", # iOS minimum version.
          },
          "navigationInfo": { # Information of navigation behavior. # Information of navigation behavior of a Firebase Dynamic Links.
            "enableForcedRedirect": True or False, # If this option is on, FDL click will be forced to redirect rather than
                # show an interstitial page.
          },
          "dynamicLinkDomain": "A String", # Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl
              # [Learn
              # more](https://firebase.google.com/docs/dynamic-links/android/receive) on
              # how to set up Dynamic Link domain associated with your Firebase project.
              #
              # Required if missing domain_uri_prefix.
          "androidInfo": { # Android related attributes to the Dynamic Link. # Android related information. See Android related parameters in the
              # [documentation](https://firebase.google.com/docs/dynamic-links/create-manually).
            "androidPackageName": "A String", # Android package name of the app.
            "androidLink": "A String", # If specified, this overrides the ‘link’ parameter on Android.
            "androidFallbackLink": "A String", # Link to open on Android if the app is not installed.
            "androidMinPackageVersionCode": "A String", # Minimum version code for the Android app. If the installed app’s version
                # code is lower, then the user is taken to the Play Store.
          },
        },
        "suffix": { # Short Dynamic Link suffix. # Short Dynamic Link suffix. Optional.
          "customSuffix": "A String", # Only applies to Option.CUSTOM.
          "option": "A String", # Suffix option.
        },
        "sdkVersion": "A String", # Google SDK version. Version takes the form "$major.$minor.$patch"
        "longDynamicLink": "A String", # Full long Dynamic Link URL with desired query parameters specified.
            # For example,
            # "https://sample.app.goo.gl/?link=http://www.google.com&apn=com.sample",
            # [Learn
            # more](https://firebase.google.com/docs/reference/dynamic-links/link-shortener).
      }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Response to create a short Dynamic Link.
        "previewLink": "A String", # Preview link to show the link flow chart. (debug info.)
        "shortLink": "A String", # Short Dynamic Link value. e.g. https://abcd.app.goo.gl/wxyz
        "warning": [ # Information about potential warnings on link creation.
          { # Dynamic Links warning messages.
            "warningMessage": "A String", # The warning message to help developers improve their requests.
            "warningDocumentLink": "A String", # The document describing the warning, and helps resolve.
            "warningCode": "A String", # The warning code.
          },
        ],
      }