Comments (7)
This should now be on pip as version 3.2.2
!
I'll go ahead and close this issue, but feel free to open it back up if you have any more issues!
from hubspot3.
Hey @jpetrucciani , your latest commit fixes the bug!
I can finally do contacts.ContactsClient(access_token=hubspotSession['accessToken'], refresh_token=hubspotSession['refreshToken'], debug=True)
and it works as I expect including building the headers as defined in their official docs (checking with debug=True) and basically everything works exactly as if I used the API key method!
Well done mate!
from hubspot3.
You should be able to use an access_token
and a refresh_token
instead of an api_key
when initializing any of the clients!
Lines 36 to 45 in ff5e4b9
Example:
# instead of:
deals_client = DealsClient(api_key=API_KEY)
# you can do:
deals_client = DealsClient(access_token=ACCESS_TOKEN, refresh_token=REFRESH_TOKEN)
You should be able to do this with any of the current clients!
from hubspot3.
It doesn't work unfortunately.
It sets the access token in the URL itself instead of in the header so it doesn't work (should have Authorization: Bearer {token} header).
Also, I see the utils.refresh_access_token() uses an outdated endpoint.
See here: https://developers.hubspot.com/docs/methods/oauth2/refresh-access-token
I actually need to use the OAuth authentication method and I really like to use the library so I won't have to manually implement all of the clients you've already implemented.
Would it be possible to release a quick fix for this please?
Thanks!
from hubspot3.
Hmm, sorry about that! I haven't had to use the OAuth methods yet so that functionality hasn't been touched in a while.
I've pushed some small fixes for that that should work (12937eb), however, I don't currently have access to an OAuth setup to test it out. I've basically just changed it to the newer refresh endpoint, and added that Authorization header instead of appending the access_token to the params.
If you could pull that commit down locally to test and let me know if that works the way you are expecting, I can push that to pip!
from hubspot3.
Sure man! Be glad to help - win-win situation here ;)
Seems there's a bug in the commit - will comment there with the technical part.
Once fixed just LMK and I'll pull the commit and test again.
from hubspot3.
Awesome! I'll get this fix deployed to pip soon
from hubspot3.
Related Issues (20)
- Trouble using the command line "AttributeError: 'int' object has no attribute 'value'" HOT 16
- Not found response on create or update pipeline HOT 2
- How would you paginate the contacts? HOT 2
- Question: Transactional Email API HOT 1
- Result window too large when querying recently modified companies HOT 3
- How to paginate contacts? HOT 1
- Engagement API, function get_associated contains two print statements HOT 2
- No verbose output to log in case of retries
- get_all() fails HOT 4
- Async implementation is in the roadmap? HOT 1
- Updating a Hubspot Company is not doing anything
- Get data from HubspotConflict
- Review API and use version 3 instead of 1?
- Unable to pass params to contacts.get_all() HOT 1
- Help needed - Is there any way to load all the events using Web Analytics API
- Error on calling client.usage_limits
- Feature request: support for /email/public/v1/events endpoint
- ACCESS TOKEN example HOT 1
- Disabling auto-retry spams out warnings HOT 2
- Emit metrics about API calls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubspot3.