# Plotly.tools.set\_credentials\_file

**URL:** <https://community.plotly.com/t/plotly-tools-set-credentials-file/28625>\
**Category:** 📊 Plotly Python\
**Created:** [September 13, 2019, 12:58am UTC](https://community.plotly.com/t/plotly-tools-set-credentials-file/28625 "2019-09-13T00:58:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![madjagan](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@madjagan](https://community.plotly.com/u/madjagan)\
**Post date:** [September 13, 2019, 12:58am UTC](https://community.plotly.com/t/plotly-tools-set-credentials-file/28625/1 "2019-09-13T00:58:53Z")

</div>

Am exploring functionality in plotly for a project and want to set the credentials for the server.  
However, the following code wouldn’t work:

import plotly  
plotly.tools.set\_credentials\_file(username=’YourAccountName’, api\_key=’YourAPIKey’)

ttributeError: module ‘plotly.tools’ has no attribute ‘set\_credentials\_file’

The ‘set\_credentials’ method no longer seems to be available.  
Has anything changed?

---

<div class="post-metadata">

**Author:** ![michaelbabyn](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/michaelbabyn/32/3569_2.png) [@michaelbabyn](https://community.plotly.com/u/michaelbabyn)\
**Post date:** [September 13, 2019, 2:32pm UTC](https://community.plotly.com/t/plotly-tools-set-credentials-file/28625/2 "2019-09-13T14:32:48Z")

</div>

Starting in plotly version 4.0, all Chart Studio related functionality has been moved to the `chart_studio` library. You can read more about the change in the [v4 migration guide](https://plot.ly/python/v4-migration/#online-features-plotlyplotly-moved-to-chartstudio-package) and our [getting started with chart-studio doc](https://plot.ly/python/getting-started-with-chart-studio/).
