I’m facing the same issue for data storage. I’m trying to access the data storage in iParams.js, and I have an OAuth setup to integrate with a third-party app. when I come to install or update the app on the Manage Apps page. the client. db.get() in my iparams.js is throwing an error status: 403, message: ‘Action forbidden’, errorSource: ‘APP’. If I come to edit the settings of my app on the Manage Apps page, the same client.db.get() in iparams.js is working properly.
Hello @Raviraj , @Saif
I look forward to hearing from you.
The error is intentional.
In the iparams.js file, only the Request Method and Server Method Invocation features are available before installation.
The key-value storage feature will not be available before the app installation. However, it will work for post-installation of the app.
This is an expected behavior. Let us know what you are trying to achieve, and I will see if we can provide any suggestions for a workaround.
I’m developing a serverless app that is integrated with a third-party app.I want to show a failed API request to the user on the settings page. So I stored those failed records in key-value storage. This is the reason to fetch the data from the key-value store in my iparams.js file.
@Kithiyon If the failed records are from operations happening in the Serverless app, it’s already an installed app, and this operation is only required after the app installation, I believe.
If it’s the same, can you use the key-value storage for post-installation and ignore its use before the installation? If it fails with the access denied error, you can throw a user-readable error to the user to install the app and then access this page for the results.
Please confirm if my assumption is correct.
Yes, you’re correct @Raviraj
If the user comes to install the app,I will show the user a readable error message. If they come to update the app, if key-value storage has data, what can I do? I’m getting the error while updating the app too.
You mentioned in the first post that it works fine while updating the app.
Can you confirm what is the reliable behavior while using the key-value storage methods in the iparams page when updating the app?
If I edit the iparams settings, it will work. If I update the app after the changes, it’s not working.
@Kithiyon Only Request Method and SMI features are always available on the Installation Parameters page.
The key-value storage works post-installation. When installing or updating the app, the key-value pair allowed to be used may tangle without any app reference if the installation or update is not completed. So, it doesn’t work before the app is installed or while being updated.
If you have a use case to save something during installation or update, please use the installation parameters. If it doesn’t work for your use case, can you share the reasons, and we can try to solve that?
Thank you @Raviraj
For now, we are showing a user-readable message while they come to update the app. Let me explain a simple example: I’m building a serverless app, and I want to show the failed API requests to the user, so I should save those failed requests in the database. I’m using the iparams page to show the failed API request. If the user comes to update the app by clicking the update button, the data from DB is not coming, so how can I show the data to the user?