Reputation: 61
How can I hide api key in bixby-studio?
I want to make bixby capsule Using API data. but I can't find how to hide API key
this is example code at code/requestmovie.js
module.exports.function = function requestmovie () {
const http = require('http');
const console = require("console")
// here !!
let url = 'url with api key'
let response = http.getUrl(url, {format: 'xmljs'})
let MovieList = {}
let lists = response.movieList
MovieList.firstmovietitle = lists[0].movieNm
return MovieList
}
I want to hide my API key
Upvotes: 3
Views: 127
Reputation: 1800
Bixby provides the ability to save secrets and safely access them from your code.
https://bixbydevelopers.com/dev/docs/reference/JavaScriptAPI/secret
Upvotes: 6