I have followed the instructions on the website for download of plotly for node.js. However I have issues in the authentication step, and am unable to find the credentials file to insert the API key. Could someone kindly help me in this regards?
Thanks a lot.
The node.js API doesnât come with a credentials file. You have to fill in your own e.g.
echo '{ "username": "bob", "apiKey": "adsad" }' > credentials.json
Created the json file as well. However, on firing up node on the terminal, the output continues to be:
Code: var plotly = require(âplotlyâ)(âahana204â, âxzvdotRTClsNR8NdpBsNâ)
Output: undefined
Iâm not sure how to help you here.
The node.js API does not look for a credentials file upon var plotly = require('plotly')
- unlike our âhigher-levelâ APIs such as plotly.py and R plotly. So once you filled in your credentials file, youâll have to do something like:
var creds = require(/* /path/to/credentials.json */)
var plotly = require('plotly')(creds.username, creds.apiKey)
// ...
1 Like
did you ever solve this? i have the same issue
I switched to using D3JS for charting instead. Plotly for NodeJs didnât have the best functionality for charts.