The caller does not have permission [403] when calling Dynamic Links Analytics API
See original GitHub issueI am trying to get dynamic link stats via Dynamic Links Analytics API with the method FirebaseDynamicLinksService.V1.GetLinkStats()… I was able to create a short link easily and it works… But the problem is to get the stats about this dynamic link.
I got 403: “Google.Apis.Requests.RequestError The caller does not have permission [403] Errors [Message[The caller does not have permission] Location[ - ] Reason[forbidden] Domain[global]]”
Is there something I am missing? I tried to follow this https://firebase.google.com/docs/reference/dynamic-links/analytics
My code basically looks like this:
var googleCredential = GoogleCredential.FromFile(shortLinkServiceConfiguration.KeyFileName).CreateScoped($"https://www.googleapis.com/auth/firebase");
var dynamicLinksService = new FirebaseDynamicLinksService(new Google.Apis.Services.BaseClientService.Initializer
{
HttpClientInitializer = googleCredential,
ApplicationName = shortLinkServiceConfiguration.ApplicationName
});
var request = dynamicLinksService.ShortLinks.Create(createShortDynamicLinkRequest);
request.AccessToken = googleCredential.UnderlyingCredential.GetAccessTokenForRequestAsync().Result;
// This works and I get the short link
var response = request.Execute();
var secondRequest = dynamicLinksService.V1.GetLinkStats(response.ShortLink);
secondRequest.AccessToken = googleCredential.UnderlyingCredential.GetAccessTokenForRequestAsync().Result;
secondRequest.DurationDays = 7;
// This does not work and I get 403
var secondResponse = secondRequest.Execute();
Issue Analytics
- State:
- Created 4 years ago
- Comments:14
Top Results From Across the Web
The caller does not have permission [403] when calling ...
I am trying to get dynamic link stats via Dynamic Links Analytics API with the method FirebaseDynamicLinksService.V1.GetLinkStats() ... I was ...
Read more >[Solved]-The caller does not have permission [403] when ...
Coding example for the question The caller does not have permission [403] when calling Dynamic Links Analytics API-C#.
Read more >403 forbidden
403 means the authorized user doesn't have access to the account. If you log into the GA web interface, view a report, then...
Read more >The caller does not have permission [403]No individual ...
I am experiencing error on multiple locations in Google My Business when trying to update them via the API. we get the following...
Read more >Troubleshoot Cloud Functions
This error message indicates that the caller does not have permission to invoke the function. Note: Visiting the Cloud Functions URL in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, one final thing to check - the IAM permissions of the service account you’re using.
I just managed to reproduce your problem with a freshly-created service account with no permissions. I then added the “Firebase Grow Viewer” role to the service account in the IAM dashboard and the error went away. Could you check what roles your service account has access to, and try adding “Firebase Grow Viewer” if it’s not already there?
Hooray - I’m glad that worked 😃 I guess Grow is a separate thing…