I'm currently trying to implement a server in Go working with Firebase Cloud Messaging. I inserted my API key and sender ID (which I both got from the Firebase console at Project Settings -> Cloud Messaging) and did this:
err := gcm.Listen(senderID, apiKey, onMessageReceived, nil)
and all I get is this
error creating xmpp client>error connecting client>auth failure: not-authorized
I'm using the same library Google's using in it's examples. Is the library maybe not working with FCM yet or am I doing something wrong?
If it's the library, how would I implement this without it?
This library will works perfectly with firebase, if you do several things:
func xmppUser(senderId string) string {
return senderId + "@" + xmppDomain
}