# Go plugin using firebase admin sdk package

**URL:** <https://forum.heroiclabs.com/t/go-plugin-using-firebase-admin-sdk-package/4250>\
**Category:** Runtime Framework\
**Tags:** server-framework\
**Created:** [August 18, 2023, 4:00pm UTC](https://forum.heroiclabs.com/t/go-plugin-using-firebase-admin-sdk-package/4250 "2023-08-18T16:00:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscargoldman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/oscargoldman/32/28_2.png) [@oscargoldman](https://forum.heroiclabs.com/u/oscargoldman)\
**Post date:** [August 18, 2023, 4:00pm UTC](https://forum.heroiclabs.com/t/go-plugin-using-firebase-admin-sdk-package/4250/1 "2023-08-18T16:00:26Z")

</div>

We have been using Firebase Cloud Messaging for several years, using the REST interface from both lua and go plugins in Nakama. We are now working through accommodating their v1 implementation as the legacy http version will be discontinued as of next year. The new V1 system requires temporary Oauth tokens to authenticate against the FCM service, and the only way it seems to get such a key is to utilize a firebase library (no REST implementation seems to exist). We have successfully implemented the use of the Firebase go sdk for this purpose as a standalone client, but when trying to fold in to our existing nakama plugin code, we can’t resolve dependency conflicts between packages used for nakama and firebase. We are testing this using the latest nakama version 3.17 and `firebase.google.com/go v3.13.0+incompatible` - the latest firebase go package. Has anyone been able to get this working? Is this even possible?

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [August 18, 2023, 4:38pm UTC](https://forum.heroiclabs.com/t/go-plugin-using-firebase-admin-sdk-package/4250/2 "2023-08-18T16:38:48Z")

</div>

Hello @oscargoldman,

This is a [Go dependency pinning](https://heroiclabs.com/docs/nakama/server-framework/go-runtime/go-dependencies/) issue.

I was able to load `firebase.google.com/go/v4 v4.12.0` in a plugin using `Nakama 3.17.0` by adding the following to the plugin:

go.mod

```auto
firebase.google.com/go/v4 v4.12.0
golang.org/x/oauth2 v0.10.0
google.golang.org/grpc v1.56.2

```

main.go

```auto
"firebase.google.com/go/v4"
_ "golang.org/x/oauth2"
_ "google.golang.org/grpc/attributes"

```

This may work for you, but you may need to adjust depending on what other dependencies your plugin is using.

Best

---

<div class="post-metadata">

**Author:** ![oscargoldman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/oscargoldman/32/28_2.png) [@oscargoldman](https://forum.heroiclabs.com/u/oscargoldman)\
**Post date:** [August 18, 2023, 4:41pm UTC](https://forum.heroiclabs.com/t/go-plugin-using-firebase-admin-sdk-package/4250/3 "2023-08-18T16:41:51Z")

</div>

thanks a bunch for the tip, we’ll give it a shot.

---

<div class="post-metadata">

**Author:** ![oscargoldman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/oscargoldman/32/28_2.png) [@oscargoldman](https://forum.heroiclabs.com/u/oscargoldman)\
**Post date:** [August 18, 2023, 4:53pm UTC](https://forum.heroiclabs.com/t/go-plugin-using-firebase-admin-sdk-package/4250/4 "2023-08-18T16:53:03Z")

</div>

That worked Simon, thanks a lot!
