I follow the instruction to upload a photo link.
I get the photoId after call.
But I can not get the image by call :
curl --request GET \
--url 'streetviewpublish.googleapis.com/v1/photos?key=YOUR_API_KEY' \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN'
or call:
curl --request GET \
--url 'streetviewpublish.googleapis.com/v1/photo/PHOTO_ID?key=YOUR_API_KEY' \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN'
I see the tutorial say that if you get the photoId means the upload is the success. How can I make sure my photo is upload success?
update: Base on Mr.Rebot's opinion, I add --verbose to see the response detail. But I can not found any error from response. I guess the root cause may be happen on Upload the photo bytes to the Upload URL. I check the response detail. It not show the message like "* upload completely sent off: 632 out of 632 bytes" in Upload the metadata of the photo response. But I don't know how to solve it.
the Upload the photo bytes to the Upload URL response is show below:
* Trying 216.58.200.42...
* TCP_NODELAY set
* Connected to streetviewpublish.googleapis.com (216.58.200.42) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.googleapis.com
* Server certificate: Google Internet Authority G2
* Server certificate: GeoTrust Global CA
> POST /media/user/114009162009986408485/photo/3946916238102603576 HTTP/1.1
> Host: streetviewpublish.googleapis.com
> User-Agent: curl/7.51.0
> Accept: */*
> Authorization: Bearer ya29.GlvKBHgR75-11mkyh-7Yy0YHSnY2at7ceBKkmcz6Kmt0axDqRD7iTfqp8_nfBZgQrU25V77WKk3gCBZ6w6ce9TBz26mLusLzZqjX7qUGi306Z_PhkPTSqfXZwte2
> Content-Length: 2684889
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 200 OK
< X-GUploader-UploadID: AEnB2Uq1RvuwmbMZizf-MLlPcB8hJC2NBgpaEMR-K_AomU7nIQ7DTkv94Ekij3_zPNyPK7tTypkYywHualC_EnvzCoM2OuosuckDFF8OtoLT97CecFwnYk4
< Content-Length: 0
< Date: Mon, 18 Sep 2017 06:01:25 GMT
< Server: UploadServer
< Content-Type: text/html; charset=UTF-8
< Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35"
<
* Curl_http_done: called premature == 0
* Connection #0 to host streetviewpublish.googleapis.com left intact
the Upload the metadata of the photo response is show below:
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 216.58.200.234...
* TCP_NODELAY set
* Connected to streetviewpublish.googleapis.com (216.58.200.234) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.googleapis.com
* Server certificate: Google Internet Authority G2
* Server certificate: GeoTrust Global CA
> POST /v1/photo?key=AIzaSyBINbdfV0eqE2fdc_ywJzL-oCa7fs_qNrQ HTTP/1.1
> Host: streetviewpublish.googleapis.com
> User-Agent: curl/7.51.0
> Accept: */*
> Authorization: Bearer ya29.GlvKBHgR75-11mkyh-7Yy0YHSnY2at7ceBKkmcz6Kmt0axDqRD7iTfqp8_nfBZgQrU25V77WKk3gCBZ6w6ce9TBz26mLusLzZqjX7qUGi306Z_PhkPTSqfXZwte2
> Content-Type: application/json
> Content-Length: 632
>
* upload completely sent off: 632 out of 632 bytes
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Vary: X-Origin
< Vary: Referer
< Date: Mon, 18 Sep 2017 05:47:24 GMT
< Server: ESF
< Cache-Control: private
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35"
< Accept-Ranges: none
< Vary: Origin,Accept-Encoding
< Transfer-Encoding: chunked
<
{
"photoId": {
"id": "CAoSLEFGMVFpcE9Zc0I4U25pWkcwaUFRWk11ZXZ3d3VzVkRaUTFxZlIyWks5VnE2"
}
}
* Curl_http_done: called premature == 0
* Connection #0 to host streetviewpublish.googleapis.com left intact