Just a bit of a Gotcha to warn people about (it is an edge case (obviously!) but confusing when it happens)…
If you sign up to Pathfix with [email protected] then that is the account that you need to pass when “initialising” in the API.
This is not always that helpful, as you may have set up your Google Cloud Platform project in a different way. Or need to authorise with a different email address.
My Edge Case - For “sensitive” scopes (i.e. just reading a calendar), Google now requires you to get your app validated prior to use, which is a pain when testing. You can either click through the dire warning on the browser each time, or set it up so that you limit the access to emails on the owned domain you are using at the time. The latter is simpler for testing.
So if you set up the app to allow access from only *@mycoolstuff.com then but Pathfix is registered to [email protected] then it will constantly give you an unauthorised error when doing a Passthru call. Something like “The Host or Origin does not have priveleges to complete the request.” - Yeah, complete with spelling mistake
Even if you sign up using the account to your app, it will fail on Initialise.
What you need to do is navigate to …
With the email address in your API call and your Pathfix Public key, and this will authorise it to the Passthru.
Am sure there are other use cases, but it is confusing when you are always getting errors.