[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[],[],null,["\u003cbr /\u003e\n\n| **Note:** Firebase Dynamic Links is *deprecated* and should not be used in new projects. The service will be shutting down soon. Follow the [migration guide](/support/dynamic-links-faq#how_should_i_migrate_from_the_service) and see the [Dynamic Links Deprecation FAQ](/support/dynamic-links-faq) for more information.\n| **Note** : The full [Short Links API reference](/docs/reference/dynamic-links/link-shortener) can be found in the Reference section.\n\nYou can create short Dynamic Links with the Firebase Dynamic Links REST API. This API\naccepts either a long Dynamic Link or an object containing Dynamic Link parameters, and\nreturns a URL like the following example: \n\n```\nhttps://example.page.link/WXYZ\n```\n\nShort Dynamic Links created with the API and client (Android/Apple) SDK do not show up\nin the Firebase console. Such Dynamic Links are intended for user-to-user sharing.\nFor marketing use cases, continue to create your links directly through the\n[Dynamic Links page](https://console.firebase.google.com/project/_/durablelinks/)\nof the Firebase console.\n\nBefore you begin\n\n1. Get your API key. You will need an API key to authenticate your requests to the API. To find your API key:\n 1. Open the [Settings page](https://console.firebase.google.com/project/_/settings/general/) of the Firebase console. If you are prompted to choose a project, select your Firebase project from the menu.\n 2. Take note of the value of the **Web API Key** field.\n2. In the Firebase console, open the **Dynamic Links** section.\n3. If you have not already accepted the terms of service and set a domain\n for your Dynamic Links, do so when prompted.\n\n If you already have a Dynamic Links domain, take note of it. You need to\n provide a Dynamic Links domain when you programmatically create Dynamic Links.\n\nCreating a short Dynamic Link\n\nCreate a short link from a long link\n\nYou can use the Firebase Dynamic Links API to shorten a long Dynamic Link. To do so,\nmake an HTTP POST request to the `shortLinks` endpoint, specifying the\nlong Dynamic Link in the `longDynamicLink` parameter. For example: \n\n```\nPOST https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=api_key\nContent-Type: application/json\n\n{\n \"longDynamicLink\": \"https://example.page.link/?link=https://www.example.com/&apn=com.example.android&ibi=com.example.ios\"\n}\n```\n\nSee [Manually construct a URL](/docs/dynamic-links/create-manually) to learn how\nto create long Dynamic Links.\n\nCreate a short link from parameters\n\nYou can also create a short Dynamic Link by specifying the Dynamic Link parameters\ndirectly. To do so, make an HTTP POST request to the `shortLinks`\nendpoint, specifying the Dynamic Link parameters in the `dynamicLinkInfo` parameter.\nFor example: \n\n```\nPOST https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=api_key\nContent-Type: application/json\n\n{\n \"dynamicLinkInfo\": {\n \"domainUriPrefix\": \"https://example.page.link\",\n \"link\": \"https://www.example.com/\",\n \"androidInfo\": {\n \"androidPackageName\": \"com.example.android\"\n },\n \"iosInfo\": {\n \"iosBundleId\": \"com.example.ios\"\n }\n }\n}\n```\n\nFor a complete specification of the `dynamicLinkInfo` object, see the\n[API reference](/docs/reference/dynamic-links/link-shortener).\n\nSet the length of a short Dynamic Link\n\nYou can also set the `suffix` parameter to specify how the path component of the\nshort Dynamic Link is generated.\n\nBy default, or if you set the parameter to `\"UNGUESSABLE\"`, the path component\nwill be a 17-character string, such as in the following example: \n\n```\nhttps://example.page.link/UVWXYZuvwxyz12345\n```\n\nSuch strings are created by base62-encoding randomly generated 96-bit numbers.\nUse this setting to prevent your Dynamic Links URLs from being guessed and crawled,\nwhich can potentially expose sensitive information to unintended recipients.\n\nIf you set the parameter to `\"SHORT\"`, the path component will be a string that\nis only as long as needed to be unique, with a minimum length of 4 characters. \n\n```\nhttps://example.page.link/WXYZ\n```\n\nUse this method if sensitive information would not be exposed if a short Dynamic Link\nURL were guessed.\n\nThe following example shows how you can set the `suffix` parameter: \n\n```\nPOST https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=api_key\nContent-Type: application/json\n\n{\n \"longDynamicLink\": \"https://example.page.link/?link=http://www.example.com/&apn=com.example.android&ibi=com.example.ios\",\n \"suffix\": {\n \"option\": \"UNGUESSABLE\"\n }\n}\n\n```\n\nEnsure deep link is valid\n\nAt minimum, the deep-link value provided must begin with http:// or https:// schemes.\nIt must also match any URL patterns whitelist entered in the console.\nElse, the creation API will fail with HTTP error code 400.\n\nNext steps\n\nNow that you've created Dynamic Links, you need to set up your app to receive\nDynamic Links and send users to the right place in your app after a user opens them.\n\nTo receive Dynamic Links in your app, see the documentation for\n[iOS](/docs/dynamic-links/ios/receive), [Android](/docs/dynamic-links/android/receive),\n[C++](/docs/dynamic-links/cpp/receive), and [Unity](/docs/dynamic-links/unity/receive).\n\nRequests are limited to 5 requests/IP address/second, and 200,000 requests/day.\nIf exceeded, then the response will return HTTP error code 429. To request for\nmore quota, fill out this [form](https://firebase.google.com/support/troubleshooter/fdl/quotas)."]]