با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Street View Static API ممکن است در صورت بروز مشکل، خطا یا اخطاری صادر کند. این راهنما هر پیام خطا را توضیح میدهد و دستورالعملهای بیشتری برای رفع خطاها ارائه میدهد.
درخواست های نامعتبر
در صورت درخواست نامعتبر، API استاتیک نمای خیابان یک کد وضعیت HTTP 4xx و پیامی که مشکل را توصیف میکند، برمیگرداند. در زیر نمونه هایی از چنین شرایط خطا آورده شده است. توجه: این لیست کاملی از خطاهای احتمالی نیست. لطفاً کد خطای واقعی و پیام بازگردانده شده توسط API را برای جزئیات مشکلات خاص بررسی کنید.
مثال شرط خطا
کد وضعیت
درخواست شامل یک پارامتر نامعتبر است یا یک پارامتر مورد نیاز وجود ندارد. به عنوان مثال، پارامتر size در محدوده مورد انتظار مقادیر عددی نیست یا در درخواست وجود ندارد.
400 BAD REQUEST
کلید API موجود در درخواست نامعتبر است.
403 FORBIDDEN
خطاهایی که مانع از نمایش تصویر نمای خیابان می شود
اگر درخواست معتبر است، اما خطای دیگری رخ می دهد که از نمایش تصویر نمای خیابان جلوگیری می کند، API استاتیک نمای خیابان بسته به خطا، متن یا تصویر خطا را به جای تصویر نمای خیابان برمی گرداند. یک مثال از چنین شرایط خطا زمانی است که برنامه از محدودیت های استفاده خود فراتر رود. شکل: یک تصویر خطا به جای تصویر نمای خیابان نمایش داده می شود
خطاهای مربوط به کلیدهای API و صورتحساب
اگر از Street View Static API بدون کلید API استفاده میکنید، یا اگر صورتحساب در حساب شما فعال نباشد، صفحه به جای تصویر نمای خیابان، یک تصویر خطا را با پیوندی نشاندهنده نوع خطا نشان میدهد. به عنوان مثال "g.co/streetviewerror/key".
خطاها و راه حل های بدون کلید
شما در حال استفاده از Street View Static API بدون کلید API هستید. برای حل، شما باید:
تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThis guide explains error messages returned by the Street View Static API and provides instructions for resolving them.\u003c/p\u003e\n"],["\u003cp\u003eInvalid requests result in a \u003ccode\u003e4xx\u003c/code\u003e status code with a descriptive message, such as errors related to parameters or invalid API keys.\u003c/p\u003e\n"],["\u003cp\u003eWhen a valid request cannot display a street view image due to issues like usage limits, either text or an error image is returned.\u003c/p\u003e\n"],["\u003cp\u003eUsing the API without a key or billing enabled leads to an error image with a link to further information and solutions.\u003c/p\u003e\n"]]],[],null,["# Error Messages in Street View Static API\n\nThe Street View Static API may issue an error or warning when something goes\nwrong. This guide explains each error message, and provides further\ninstructions for resolving errors.\n\nInvalid requests\n----------------\n\nIn the case of an invalid request, the Street View Static API returns\nan HTTP `4xx` status code and a message describing the\nproblem. Below are examples of such error conditions. Note: This is not\na complete list of the possible errors. Please check the actual error code\nand message returned by the API for details of specific problems.\n\n| Example of error condition | Status code |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|\n| The request includes an invalid parameter, or a required parameter is missing. For example, the `size` parameter is not within the expected range of numeric values, or is missing from the request. | `400 BAD REQUEST` |\n| The API key included in the request is invalid. | `403 FORBIDDEN` |\n\nErrors that prevent a street view image from being displayed\n------------------------------------------------------------\n\nIf the request is valid, but another error occurs that prevents the street view image from\nbeing displayed, the Street View Static API returns either text or an error\nimage instead of the street view image, depending on the error. An example of such an error\ncondition is when the application exceeds its\n[usage limits](/maps/documentation/streetview/usage-limits).\n\nFigure: An error image displayed instead of a street view image\n\n### Errors related to API keys and billing\n\nIf you use the Street View Static API without an API key, or if billing\nis not enabled on your account, the page displays an error image instead of a\nstreet view image, with a link indicating the type of error. For example\n\"g.co/streetviewerror/key\".\n\n| Keyless errors and solutions ||\n|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | You are using the Street View Static API without an API key. To resolve, you must: 1. [Get an API key](/maps/documentation/streetview/get-api-key#get-an-api-key) 2. [Enable billing](https://console.cloud.google.com/project/_/billing/enable?utm_source=Docs_BillingNudge) 3. [Sign your URL](/maps/documentation/streetview/get-api-key#digital-signature) |\n| | Your request is missing a digital signature (required). To resolve, [Sign your URL](/maps/documentation/streetview/get-api-key#digital-signature) |"]]