Sorry about the newbie question - Iâm likely doing something simple incorrectly.
I signed up for a demo account (user=admin) at the Plotly site.
I regenerated my API key and copied it locally.
Via set_credentials_file I created the following file (Iâve xâd out the api_key):
{
âusernameâ: âadminâ,
âapi_keyâ: âxxxxxxxxxxxxxxxxâ,
âproxy_usernameâ: ââ,
âproxy_passwordâ: ââ,
âstream_idsâ: []
}
However in a Python 3.6 environment:
plotly.plotly.sign_in(âadminâ, key from credentials file)
fails with
plotly.exceptions.PlotlyRequestError: Bad API key
I tried another key regeneration with the same problem.
Finally, when trying to create an online chart via py.plot() without a manual sign_in, I get:
plotly.exceptions.PlotlyRequestError: Aw, snap! You tried to use our API as the user âadminâ, but the supplied API key doesnât match our records. You can view your API key at https://plot.ly/settings/api
Iâm pretty sure my copy and paste of the key was correct both times. Is there anything else that could be wrong?
Thanks
This was my confusion between the instructions for accessing a demo On-Premise account, and a personal account. Everything is working correctly now.