API key?

I’m writing a script to fetch the device inventory using the API. But I don’t see any API key in Hosted Mender?

Hi @ngrilly,

Take a look at this section in the docs, which should cover how to get an access key,



Now obtain a management API JSON Web Token by using the Open Source or Enterprise login API:

JWT=$(curl -X POST -u $MENDER_SERVER_USER $MENDER_SERVER_URI/api/management/v1/useradm/auth/login)

Hi @mirzak,

Yes, this is what I currently do. But the JWT token expires after a few days. That means the server needs to know my Mender username and password, to be able to refresh the JWT token. That’s why I’m asking for API keys.

Ah, understand. We do not yet have API keys and currently only the mentioned method is supported. With that said, it is definitely a valid use-case to provide API keys and is something that we are looking at.

1 Like