Method: photo.startUpload
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Solicitud HTTP
POST https://streetviewpublish.googleapis.com/v1/photo:startUpload
La URL usa la sintaxis de la transcodificación gRPC.
Cuerpo de la solicitud
El cuerpo de la solicitud debe estar vacío.
Cuerpo de la respuesta
Si se ejecuta de forma correcta, el cuerpo de la respuesta contiene una instancia de UploadRef
.
Permisos de autorización
Requiere el siguiente alcance de OAuth:
https://www.googleapis.com/auth/streetviewpublish
Para obtener más información, consulta la Descripción general de OAuth 2.0.
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-25 (UTC)
[null,null,["Última actualización: 2025-07-25 (UTC)"],[[["\u003cp\u003eInitiates an upload session to facilitate uploading photo bytes using the returned UploadRef.\u003c/p\u003e\n"],["\u003cp\u003eUploaded photos must meet specific requirements, including Photo Sphere XMP metadata and size specifications.\u003c/p\u003e\n"],["\u003cp\u003eUpon completion, the UploadRef is utilized with photo.create to generate the Photo object entry.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be empty for the POST request to \u003ccode\u003ehttps://streetviewpublish.googleapis.com/v1/photo:startUpload\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/streetviewpublish\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This describes how to start uploading photo bytes for Street View. It involves creating an upload session using a POST request to `https://streetviewpublish.googleapis.com/v1/photo:startUpload` with an empty request body. The response returns an `UploadRef` URL, which is used to upload the photo bytes. The photo needs Photo Sphere XMP metadata and must meet Google Maps' size requirements, including being a full 360-degree panorama. Finally use the `UploadRef` with `photo.create` to finalize. The process requires OAuth scope `https://www.googleapis.com/auth/streetviewpublish`.\n"],null,["# Method: photo.startUpload\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates an upload session to start uploading photo bytes. The method uses the upload URL of the returned [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef) to upload the bytes for the [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n\nIn addition to the photo requirements shown in \u003chttps://support.google.com/maps/answer/7012050?ref_topic=6275604\u003e, the photo must meet the following requirements:\n\n- Photo Sphere XMP metadata must be included in the photo metadata. See \u003chttps://developers.google.com/streetview/spherical-metadata\u003e for the required fields.\n- The pixel size of the photo must meet the size requirements listed in \u003chttps://support.google.com/maps/answer/7012050?ref_topic=6275604\u003e, and the photo must be a full 360 horizontally.\n\nAfter the upload completes, the method uses [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef) with [photo.create](/streetview/publish/reference/rest/v1/photo/create#google.streetview.publish.v1.StreetViewPublishService.CreatePhoto) to create the [Photo](/streetview/publish/reference/rest/v1/photo#Photo) object entry.\n\n### HTTP request\n\n`POST https://streetviewpublish.googleapis.com/v1/photo:startUpload`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/streetviewpublish`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]