I have many 360 degree panoramas from my Android phone camera, taken in remote parts of the world. I use existing photospheres on Google Maps to plan my travels, and upload my pictures to help others do the same. Until now I used the Android Street View app to upload panoramas but the app was discontinued in March 2023.
Google suggest Street View Studio as a replacement but that only allows video uploads. You can also upload photos through the Google Maps app, but these have to be associated to an existing 'place' so they are useless for documenting remote roads, mountains etc.
Google lets you make a 'custom street view' but that looks massively complicated. I already have the self-contained 360 degree photo files ready in the required resolution and aspect ratio, I don't want to be messing around at different zoom levels serving individual tiles I don't have.
Is there a way to continue uploading photosphere JPEGs to arbitrary coordinates via a Google API?

Here's an answer using curl. You can still upload individual photo sphere images not linked to a Google Maps 'place' by using the Street View Publish API. Based on the instructions here. To use the Google APIs you first need an API key and access token as described at the top of that page. Store them in
$API_KEYand$ACCESS_TOKEN. Then there are three API calls required.First you tell Google you want to upload a new image. It returns a URL where you should POST the image bytes.
Set
UPLOAD_URLto the URL returned above, then POST the actual image file. On success there is an empty response.Finally you need to 'upload the metadata' like lat/long and capture time according to the API docs, but I found if you send metadata containing just the bare minimum uploadUrl then Google will pick up the correct pose values from the EXIF tags. However you do still need to perform this third API call for the photosphere to be publicly visible. The response contains a bunch of info about your uploaded photo.