Reputation: 3
I am building a map plugin for a Buildfire plugin. I am currently hardcoding the API for google maps, but obviously for production, I would want the plugin to read from the integrations > API tab.
Does anyone have an idea or a snippet on how I may accomplish this?
I have searched the API docs at: https://sdk.buildfire.com/docs/auth and have not been able to find the information.
Upvotes: 0
Views: 44
Reputation: 324
Certainly you can, following is an example how to get saved API keys from context:
buildfire.getContext(function(err, context) {console.log(context.apiKeys?.googleMapKey)})
https://sdk.buildfire.com/docs/context#data
https://sdk.buildfire.com/docs/api-keys#google-map-key
Upvotes: 0