martyzz1 / heroku3.py

This is the updated Python wrapper for the Heroku API V3. https://devcenter.heroku.com/articles/platform-api-reference The Heroku REST API allows Heroku users to manage their accounts, applications, addons, and other aspects related to Heroku. It allows you to easily utilize the Heroku platform from your applications.
Other
118 stars 73 forks source link

is_authenticated is False but key works fine #120

Closed skorokithakis closed 2 years ago

skorokithakis commented 2 years ago

I have hit this bizarre issue:

In [1]: import os, heroku3

In [2]: conn = heroku3.from_key(os.getenv("HEROKU_API_KEY", ""))

In [3]: conn.apps()[0]
Out[3]: <app 'myapp-1421 - 08d0a982-1234-400c-bfe1-02474a539c55'>

In [4]: conn.is_authenticated
Out[4]: False

I don't understand why this would be. When I try to call the rate-limits endpoint directly (what is_authenticated does under the hood), I get a 403 with "The scope of this OAuth authorization does not allow access to this resource.", but it's a global token.

skorokithakis commented 2 years ago

The Heroku endpoint seems to have been down, this fixed itself.