Closed TheKnottyCelt closed 4 years ago
You are probably right in that your first token was expired, revoked, etc. Your attempt to get the new credentials is incorrect though.
the call to get_request_url_and_token_secret is fine (although without a callback_url it was previously impossible to finish authentication).
the call to get_oauth_token has the wrong parameters though.
the old method signature was
get_oauth_token_via_auth_url(api_key, shared_secret, oauth_token_secret, auth_url, etsy_env=EtsyEnvProduction())
you can see the 4th parameter was the auth_url, not the verifier. The auth_url would look something like "https://seancallback.com/?oauth_token=bfa146c8d8ac1aaaa5bd07598a01c&oauth_verifier=c399b7e9#_=_" and would have been the url etsy redirected you to if you had passed a callback_url.
With that said, you are the second person to ask to be able to get oauth credentials by manually passing the verification code. I added a method to do this in 0.6.0 so you should update your package and follow the instructions in "Obtaining Etsy OAuthCredentials".
Thank you for your rapid response. 0.6.0 did the trick.
I was happy to find this porject, as I have been struggling to no end trying to make API calls to my Etsy stroe and listings.
I first tried using my pre-existing credentials which I managed to acquire using
requests
.yields the following exception:
This in turn caused an
json.decoder.JSONDecodeError
exception. Since the main cause was a rejected token, I decided to try to use `EtsyOAuthHelper to generate some new credentials.This yields the same exception noted above.