In order to send Firebase Cloud Messaging with Go, we need to place the access token in the HTTP request header.
On Firebase documentation, there are examples on how to retrieve the access token using Node.JS, Python and Java:
https://firebase.google.com/docs/cloud-messaging/auth-server
can anyone show the get the access token using Go?
There seems to be many Go packages about Firebase/Google authentication. It's very confusing to understand which ones should be used:
- firebase.google.com/go
- firebase.google.com/go/auth
- github.com/firebase/firebase-admin-go
- google.golang.org/api/option
- golang.org/x/oauth2
- golang.org/x/oauth2/google
- github.com/google/google-api-go-client