Forge store API keys for third party apps

I recently started learning forge and recently created an app that now I have to send to a client, that app uses a Token to connect to third party app to get data, now my issue is how to give access to the client to edit the Token as per their accounts. I’ve seen some apps giving an option in the “Managed Apps” page in the middle section where they have a field where I can enter the Token, for example the Clockify App.

If anyone can guide me how to achieve this, it would be really really helpful.

I’ve already tested the Forge Environment Variables but it doesn’t work for me because I want the end user / admin to be able to edit this setting.

thanks

1 Like

Hi @AbhishekGarg,

Welcome to the community!

Forge offers storage API for apps with read, write and delete capability. Read about it in our docs at https://developer.atlassian.com/platform/forge/runtime-reference/storage-api/.

With the particular use-case of storing token, we specifically offer secret api on storage. In this case, I would recommend we can create a text field for end user to enter the token the first time and store it as a secret using the storage.setSecret api. In the subsequent we can read it using the storage.getSecret api.

Hope this answers your question.

Cheers,

1 Like