Closed vsoch closed 4 years ago
@vsoch the top level config variables including api_key have been moved to the shippo.config namespace. Have you tried setting shippo.config.api_key = SHIPPO_TOKEN
instead?
I haven’t, but we are fine with providing the key to each function as needed. I do remember following the tutorial and providing it directly to the client but that didn’t seem to work. It must have been that previously the key was added directly to the client and now it’s added to the client config? Either way I’m happy to close the issue as we have a working solution.
One of the changes in 2.0.0rc1 was moving the api_key assignment to shippo.config
instead of shippo
, looks like we missed updating the error message you saw above. Updating the API guide and reference to reflect this change will be updated with the 2.0.0 release. Thanks!
Shippo version:
shippo==2.0.0rc1
I'm using a test token to generate and validate an address, and when I provide the key to shippo directly it doesn't work:
However when I provide "api_key" directly to the function it works. This seems like a bug, as the documentation details being able to provide it to shippo directly.