Using Chirpstack API endpoints on server side (Access other accounts on the server)

Hello,

I have a Chirpstack instance running and I’m looking for a way to access users and make modifications to their gateways and devices through the backend of my application.
My application has a user management service itself so I just want to define one-to-one users on Chirpstack and access them.
As far as I found out, There is one dirty way to do this:

  • Creating a new user on chirpstack when a new user registers and store the credentials. The call the Chirpstack endpoints using those credentials.

Is there any better way to do this without changing Chirpstack source code? Like defining a global API key.

This can be done through Chirpstacks Users and Tenants model.

An API key retrieved as a user with admin status can access all the tenants users gateways/devices.

Api keys retrieved as a tenant user can only be used to access their devices/gateways.

1 Like

What about the global API key? is it the same as the API keys retrieved as admin?

As long as you are not logged in as a tenant when you generate the API (and I believe you need admin status too) the API key should be global and able to access any application / device / gateway regardless of the tenant who created it.