是否有其他因素导致Google API响应“ 403:未使用API​​”

I'm building a Go client service for google analytics reporting v4, but my report calls respond with the 403 error re: unused API, with a link in the err to auth the api.

I'm using the precise same service json, view id, etc in a redash data source though with no problem.

Clearly, the API is authorized. Are there any other factors at play, perhaps in the go client or a version mismatch (redash using v3, vs go using v4)?

Worth noting:

  • when I go through the motions to authorize the api, even if i try to auth-cycle it (turn it off and on), console.google gives me a ui error re: blank referrals are ignored.

  • the acct and project are definitely linked correctly (per the auth link taking me to right project id)

I think I found it, and it sort of comes down to a version mismatch: I found a new API in the console named "Google Analytics Reporting API" for v4, which is not "Analytics API" that I'd been using.

It's a little confusing because I was trusting the auth link in the error message, which took me to the already-authorized v3 API. At the same time, I feel like this would have been a non-issue if I'd read the migration docs more closely.