pipedrive / client-nodejs

Pipedrive API client for NodeJS
MIT License
205 stars 82 forks source link

Multiple API Tokens is impossible #152

Closed STK913 closed 4 years ago

STK913 commented 4 years ago

Hello, I need to use several apiToken to export data to several CRMs, but version 10 does not allow it anymore, unlike the old version. Indeed, to add a token, it must be added in the configuration which is global to all instances, there is therefore a risk of conflicts between the data: Pipedrive.Configuration.apiToken = "gf5jalvjira8hdh1tg7gsd5d". I tried to work around this problem by using import-fresh to import a cache-free library, but it doesn't work. Do you have a solution to bring me please? Or an idea of evolution? Thank you for your feedback.

Edit : I decided to use the API directly to work around this problem... Good continuation.

daniti commented 4 years ago

hi @STK913. Api tokens are usually meant for simple integrations. It sounds like you might want to consider building an OAuth app (public or unlisted) for your use case. You can take a look here https://pipedrive.readme.io/docs/marketplace-oauth-authorization