برای جلوگیری از استفاده شخص ثالث از شناسه مشتری شما در وب سایت خود، استفاده از شناسه مشتری شما محدود به لیستی از URL هایی است که شما به طور خاص مجاز کرده اید.
شناسه مشتری خود را در کنسول Cloud پیدا کنید
مجوز URL در کنسول Cloud
نشانیهای اینترنتی مجاز شما همه در جدول نشانیهای اینترنتی مجاز برای شناسه مشتری gme-[company] در صفحه شناسه مشتری فهرست شدهاند.
برای حذف یک URL، کادر سمت چپ URL را علامت بزنید و روی نماد deleteحذف در سمت راست بالای جدول کلیک کنید.
برای افزودن URL های جدید، روی افزودن URL ها در پایین جدول کلیک کنید.
مهم: قوانین URL های شناسه مشتری مجاز با محدودیت های ارجاع دهنده کلید API متفاوت است. برای جزئیات بیشتر به زیر مراجعه کنید.
ملاحظات زیر در مورد URL هایی که مجاز هستند اعمال می شود:
نام دامنه یا آدرس IP لازم نیست برای عموم قابل دسترسی باشد.
به عنوان مثال، http://myintranet و http://192.168.1.1 ورودی های معتبر هستند.
تمام زیر دامنه های یک دامنه مشخص نیز مجاز هستند.
به عنوان مثال، اگر دامنه برهنه http://example.com مجاز باشد، ساب دامنه http://www.example.com نیز مجاز است. عکس این موضوع درست نیست: اگر http://www.example.com مجاز باشد، http://example.com به طور خودکار مجاز نیست.
تمام مسیرهای فرعی یک مسیر مجاز نیز مجاز هستند.
برای مثال، اگر http://example.com مجاز است، http://example.com/foo نیز مجاز است. علاوه بر این، از آنجا که زیر دامنه های یک دامنه مشخص نیز مجاز هستند، http://sub.example.com/bar مجاز است.
مسیرها به حروف کوچک و بزرگ حساس هستند.
برای مثال، http://www.example.com/ThisPath/ با http://www.example.com/thispath/ یکسان نیست.
شما می توانید URL های معتبر را به آنهایی که از پورت های خاصی استفاده می کنند محدود کنید.
برای مثال، اگر http://example.com:8080/foo مشخص شده باشد، http://example.com مجاز نیست.
پروتکل های HTTP و HTTPS URL های متفاوتی در نظر گرفته می شوند.
برای مثال، اگر https://example.com مجاز باشد، http://example.com به طور خودکار مجاز نیست.
اگر یک مرجع پسوندی بدون طرح پروتکل ارائه کنید، برای مثال www.example.com ، قوانین جداگانه ای برای HTTP و HTTPS ایجاد می شود.
برای طرحهای پروتکل عجیبتر از HTTP یا HTTPS، دستورالعملهای ارائهشده در کنسول Cloud را ببینید.
،
مهم: طرح ممتاز پلتفرم Google Maps دیگر برای ثبت نام یا مشتریان جدید در دسترس نیست.
شناسه کلاینت Maps JavaScript API
میتوانید درخواستهای خود را با پلتفرم Google Maps با استفاده از شناسه مشتری در ترکیب با ثبت URL (بهجای کلید API) تأیید کنید.
هنگام بارگذاری API یک شناسه مشتری مشخص کنید
کد زیر نحوه جایگزینی YOUR_CLIENT_ID با شناسه مشتری خود را هنگام بارگیری پلتفرم Google Maps نشان می دهد.
برای جلوگیری از استفاده شخص ثالث از شناسه مشتری شما در وب سایت خود، استفاده از شناسه مشتری شما محدود به لیستی از URL هایی است که شما به طور خاص مجاز کرده اید.
شناسه مشتری خود را در کنسول Cloud پیدا کنید
مجوز URL در کنسول Cloud
نشانیهای اینترنتی مجاز شما همه در جدول نشانیهای اینترنتی مجاز برای شناسه مشتری gme-[company] در صفحه شناسه مشتری فهرست شدهاند.
برای حذف یک URL، کادر سمت چپ URL را علامت بزنید و روی نماد deleteحذف در سمت راست بالای جدول کلیک کنید.
برای افزودن URL های جدید، روی افزودن URL ها در پایین جدول کلیک کنید.
مهم: قوانین URL های شناسه مشتری مجاز با محدودیت های ارجاع دهنده کلید API متفاوت است. برای جزئیات بیشتر به زیر مراجعه کنید.
ملاحظات زیر در مورد URL هایی که مجاز هستند اعمال می شود:
نام دامنه یا آدرس IP لازم نیست برای عموم قابل دسترسی باشد.
به عنوان مثال، http://myintranet و http://192.168.1.1 ورودی های معتبر هستند.
تمام زیر دامنه های یک دامنه مشخص نیز مجاز هستند.
به عنوان مثال، اگر دامنه برهنه http://example.com مجاز باشد، ساب دامنه http://www.example.com نیز مجاز است. عکس این موضوع درست نیست: اگر http://www.example.com مجاز باشد، http://example.com به طور خودکار مجاز نیست.
تمام مسیرهای فرعی یک مسیر مجاز نیز مجاز هستند.
برای مثال، اگر http://example.com مجاز است، http://example.com/foo نیز مجاز است. علاوه بر این، از آنجا که زیر دامنه های یک دامنه مشخص نیز مجاز هستند، http://sub.example.com/bar مجاز است.
مسیرها به حروف کوچک و بزرگ حساس هستند.
برای مثال، http://www.example.com/ThisPath/ با http://www.example.com/thispath/ یکسان نیست.
شما می توانید URL های معتبر را به آنهایی که از پورت های خاصی استفاده می کنند محدود کنید.
برای مثال، اگر http://example.com:8080/foo مشخص شده باشد، http://example.com مجاز نیست.
پروتکل های HTTP و HTTPS URL های متفاوتی در نظر گرفته می شوند.
برای مثال، اگر https://example.com مجاز باشد، http://example.com به طور خودکار مجاز نیست.
اگر یک مرجع پسوندی بدون طرح پروتکل ارائه کنید، برای مثال www.example.com ، قوانین جداگانه ای برای HTTP و HTTPS ایجاد می شود.
برای طرحهای پروتکل عجیبتر از HTTP یا HTTPS، دستورالعملهای ارائهشده در کنسول Cloud را ببینید.
تاریخ آخرین بهروزرسانی 2025-06-16 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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"]],["تاریخ آخرین بهروزرسانی 2025-06-16 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe Google Maps Platform Premium Plan is no longer available for new users and this documentation is for existing legacy applications using client IDs.\u003c/p\u003e\n"],["\u003cp\u003eFor new applications, always use API keys instead of client IDs for authentication.\u003c/p\u003e\n"],["\u003cp\u003eClient ID usage is restricted to authorized URLs which can be managed in the Google Cloud Console.\u003c/p\u003e\n"],["\u003cp\u003eAuthorizing a domain automatically authorizes all its subdomains and subpaths, differing from API key referrer restrictions.\u003c/p\u003e\n"],["\u003cp\u003eHTTP and HTTPS protocols are treated as separate URLs for authorization purposes, unlike API key referrer restrictions.\u003c/p\u003e\n"]]],[],null,["# Client ID URL Authorization\n\n**Important:** The Google Maps Platform Premium Plan is no longer available for\nsign up or new customers.\n| **Caution:** This document is only provided as a reference for maintaining existing legacy applications that use client IDs. For new applications, *always* use API keys! See the [Premium Plan Authentication Overview](/maps/premium/authentication/overview) for further details.\n\nMaps JavaScript API client ID authentication\n--------------------------------------------\n\nYou can authenticate your requests with the Google Maps Platform using a client ID\nin combination with **URL registration** (instead of an API key).\n\n### Specify a client ID when loading the API\n\n| **Warning:** Requests containing both a client ID and an API key may result in unexpected API behavior or unintended billing behavior. To prevent this, make sure your requests use only one of these parameters.\n\nThe code below shows you how to replace \u003cvar translate=\"no\"\u003eYOUR_CLIENT_ID\u003c/var\u003e\nwith your own client ID when loading the Google Maps Platform. \n\n \u003cscript async defer src=\"https://maps.googleapis.com/maps/api/js?client=\u003cvar translate=\"no\"\u003eYOUR_CLIENT_ID\u003c/var\u003e&v=quarterly&callback=initMap\"\u003e\u003c/script\u003e\n\n### Manage authorized URLs\n\nTo prevent a third party from using your client ID on their own website, the\nuse of your client ID is restricted to a list of URLs that you have specifically\nauthorized.\n\n#### Locate your client ID in the Cloud console\n\n| **Note:** If you are unable to locate the project linked to your client ID, see [Finding client ID project](/maps/premium/authentication/overview#finding-client-id-project) and [Pausing your client ID](/maps/premium/authentication/overview#pause-client-id).\n\n#### URL authorization in the Cloud console\n\n- Your authorized URLs are all listed in the\n **Authorized URLs for Client ID gme-\\[company\\]** table on the\n [Client ID page](https://console.cloud.google.com/project/_/google/maps-apis/clientid).\n\n- To remove a URL, check the box to the left of the URL and click the\n delete **delete** icon at the top right\n of the table.\n\n- To add new URLs, click **Add URLs** at the bottom of the table.\n\nInportant: The rules of authorized client IDs URLs differs from API key referrer\nrestrictions. See below for further details.\n\nThe following considerations apply regarding URLs that are authorized:\n\nThe domain name or IP address does not have to be publicly accessible.\n: For example, `http://myintranet` and `http://192.168.1.1` are valid entries.\n\nAll subdomains of a specified domain are also authorized.\n:\n | **Caution:** This behavior differs from API key referrer rules!\n\n: For example, if the naked domain `http://example.com` is authorized, then\n subdomain `http://www.example.com` is also authorized. The reverse\n is not true: if `http://www.example.com` is authorized, `http://example.com`\n is not automatically authorized.\n\nAll subpaths of an authorized path are also authorized.\n:\n | **Caution:** This behavior differs from API key referrer rules!\n\n: For example, if `http://example.com` is authorized, then\n `http://example.com/foo` is also authorized. In addition, because subdomains\n of a specified domain are also authorized, `http://sub.example.com/bar` is\n authorized.\n\nPaths are case sensitive.\n\n: For example, `http://www.example.com/ThisPath/` is not the same as\n `http://www.example.com/thispath/`.\n\nYou may restrict valid URLs to those using certain ports.\n\n: For example, if `http://example.com:8080/foo` is specified,\n that doesn't authorize `http://example.com`.\n\nHTTP and HTTPS protocols are considered different URLs.\n:\n | **Caution:** This behavior differs from API key referrer rules!\n\n: For example, if `https://example.com` is authorized, `http://example.com` is\n not automatically authorized.\n\n If you provide a suffix reference without protocol scheme, for example\n `www.example.com`, separate rules will be created both for HTTP and HTTPS.\n\nFor more exotic protocol schemes than HTTP or HTTPS, see the provided\ninstructions in the Cloud console."]]