Using Google Photos with COMPANION_URL gives error

I’m using Google Photos with the Transloadit COMPANION_URL and I’m getting the attached error. The COMPANION_URL works with Instagram, Google Drive, Facebook, etc., but doesn’t work with Google Photos for some reason.

Here’s some of the code:

importOptions?.includes('instagram') &&
        uppy.use(Instagram, {
            companionUrl: COMPANION_URL,
            companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
        });

    importOptions?.includes('googleDrive') &&
        uppy.use(GoogleDrive, {
            companionUrl: COMPANION_URL,
            companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
        });

    importOptions?.includes('googlePhotos') &&
        uppy.use(GooglePhotos, {
            companionUrl: COMPANION_URL,
            companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
        });

    importOptions?.includes('facebook') &&
        uppy.use(Facebook, {
            companionUrl: COMPANION_URL,
            companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
        });

    importOptions?.includes('unsplash') &&
        uppy.use(Unsplash, {
            companionUrl: COMPANION_URL,
            //companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
        });

    importOptions?.includes('box') &&
        uppy.use(Box, {
            companionUrl: COMPANION_URL,
            companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
        });

Please advise.

Hi, Google Photos is not rolled out yet on Transloadit servers. I understand this was not clear but we are working on it

Ahh…ok. Thanks…

Any guidance on how to get Google Photos working with Transloadit?

Will it work if I follow the steps here: Google Photos | Uppy

  1. On the [Google] project’s dashboard, enable the Google Photos API.
  2. Set up OAuth authorization [in Google].
  3. Use this companion url: https://api2.transloadit.com/companion/googlephotos/redirect

If not, is there another path to get Google Photos to work?

The only other way at the moment is hosting your own Companion server and your own credentials. Sorry for the inconvenience.

@Merlijn if you self host Companion, can you use remote providers and avoid having files go to transloadit as the destination?

I know with the hosted version, anything used with Companion means the files end up at transloadit servers. Just checking of that’s the same with self hosted as I’d like to, for example, use Google Photos as an option to import and have files go direct to S3.

Yes you can. From the docs:

Companion supports the same uploaders as Uppy: Tus, AWS S3, and regular multipart. But instead of manually setting a plugin, Uppy sends along a header with the uploader and Companion will use the same on the server. This means if you are using Tus for your local uploads, you can send your remote uploads to the same Tus server (and likewise for your AWS S3 bucket).

Thanks @Merlijn. I did read that but to be honest, it didn’t really make sense to me. I’m not currently using Tus; only AwsS3 for storage w/ my own API providing pre-signed urls. Local uploads are fine.
Can you point me to some examples or share some code that would articulate how I could import pics from Google Photos, OneDrive etc to S3 via self hosting? Companion, Tus, whatever.

You don’t have to do anything besides .use(AwsS3) and pointing the remote plugins to your Companion instance (and adding S3 credentials to Companion). Companion will automatically upload it to S3.

Yes, I see. Thank you very much.
I think the part I was missing was how to configure a self-hosted Companion to places the files in S3. This example is what I was looking for: