I’m having trouble with
I am trying to use the secrets module’s getSecretValue() method to retrieve a preexisting API key inside my website’s secrets manager. I’ve made a .ts file inside my wix dashboard app project’s backend which defines a getKeyValue() function. Whenever this function is called by my shipping rates service plugin file (also in the backend), the function catches an error, however it works just fine if i call it in the frontend of my dashboard app using webMethod and Permissions.
Working in
Visual Studio Code
Site link
If this is happening on a site, include a live or test site link
What I’m trying to do
I want the service plugin to be able to call getKeyValue() and retrieve my API key from within my website’s secrets manager such that I can succesfully make a call to my custom REST API to get custom shipping rates.
Extra context
File for the getKeyValue() function:
Code snippet for the plugin.ts file:
(rest of the code below isn’t important)