Is it possible to retrieve a users api key via the api?

AI 生成的摘要

jordan1909 is creating an application that sets a timer on topics for the owner when a customer replies. However, they face a challenge in statically defining the user’s API key. They have tried looking at the username.json file and the API docs but couldn’t find a suitable solution.

jordan1909 asked if it’s possible to retrieve a user’s API key via the API. sam suggested using a global admin API key and setting the api_username when making the calls. This solution worked for jordan1909, who thanked sam for the help.

In my application I have created a little app on Heroku that sets a timer on topics for whoever is the owner when a customer replies to that topic. It works quite well.

The challenge I have however is I have to statically define the users API key which is not a good idea. I’ve tried looking at the username.json file, I’ve also looked through the API docs and the only thing close is generating a new API key which is going to be somewhat unrealistic to keep doing.

Is there any query or way that I can retrieve a users api key via the api? This would allow me to get the username of the owner and dynamically get their key to set the reminder. It is only because the timer api call doesn’t allow the passing of a username.

Can’t you use a global admin API key and set the api_username when making the calls?

Damn @sam now I feel dumb.

My hero!

Don’t feel dumb! Thanks for asking!