I want to take the pano ID from a Google Streetview photosphere (e.g. this one: https://www.google.com/maps/@52.5162672,13.3777133,3a,75y,90t/data=!3m7!1e1!3m5!1s-C3h-fjBdBFo%2FWCz53BtP3dI%2FAAAAAAAAEok%2F2KEziwlh5e4SYRpoC1vnn0hQydXo9HpiACLIB!2e4!3e12!7i9000!8i4500) to receive static images with the help of the Streetview Image API. I am aware of the fact that there is a "pano" field which takes a pano ID, however Google seems to have changed the way the pano IDs look like. From what I understand the ID from the above link should be
"-C3h-fjBdBFo/WCz53BtP3dI/AAAAAAAAEok/2KEziwlh5e4SYRpoC1vnn0hQydXo9HpiACLIB"
(i.e. the part between !1s and !2e).
Pasting this ID into the Streetview API (http://maps.googleapis.com/maps/api/streetview?fov=120&pano=-C3h-fjBdBFo%2FWCz53BtP3dI%2FAAAAAAAAEok%2F2KEziwlh5e4SYRpoC1vnn0hQydXo9HpiACLIB&pitch=0&sensor=false&heading=36.9998231626&size=640x640) doesn't give me an image.
Am I missing something?
Indeed, photo spheres weren't available in the Streetview Image API, but recently Google enabled access to User Generated content via Streetview Image API.
The important detail is that the pano ID format that you mentioned in this question was replaced by the new format.
Now the pano ID
F:-C3h-fjBdBFo/WCz53BtP3dI/AAAAAAAAEok/2KEziwlh5e4SYRpoC1vnn0hQydXo9HpiACLIB
from your question should be replaced by the new pano IDCAMSSi1DM2gtZmpCZEJGby9XQ3o1M0J0UDNkSS9BQUFBQUFBQUVvay8yS0V6aXdsaDVlNFNZUnBvQzF2bm4waFF5ZFhvOUhwaUFDTElC
.You can easily convert the previous pano ID to the new format using the Streetview Image Metadata requests. These requests are free of charge and don't consume a quota
https://maps.googleapis.com/maps/api/streetview/metadata?pano=F%3A-C3h-fjBdBFo%2FWCz53BtP3dI%2FAAAAAAAAEok%2F2KEziwlh5e4SYRpoC1vnn0hQydXo9HpiACLIB&key=YOUR_API_KEY
Use the new pano ID to retrieve photo sphere:
https://maps.googleapis.com/maps/api/streetview?pano=CAMSSi1DM2gtZmpCZEJGby9XQ3o1M0J0UDNkSS9BQUFBQUFBQUVvay8yS0V6aXdsaDVlNFNZUnBvQzF2bm4waFF5ZFhvOUhwaUFDTElC&size=600x400&key=YOUR_API_KEY