Custom Data Provider

Can anyone advise on creating a custom data provider? I have gone through the example https://dundas.com/support/developer/samples/extensions/creating-a-data-provider and have it running to where I see the new data provider in Dundas. I have an application created on the site I’m trying to get data from (Hubspot) and have a ClientID and ClientSecret. I have also confirmed everything works on the Hubspot API side by trying it the Google Playground https://developers.hubspot.com/docs/faq/testing-hubspot-apis. I am confused on how the Dundas example would work with OAuth because as I understand it, you first have a URL where the user goes to the HubSpot site and gives permission, then you are sent the Request Token, then you send back the Request Token to get the Access Token. I don’t see how the Dundas twitter example does this, it seems to just send to one Twitter URL and gets the Access Token back, and I don’t see how Dundas would interact with the OAuth. Does anyone have example code from custom providers they have created besides the Twitter example? Any help would be much appreciated.

The twitter oauth example does not use a redirection url that requires user interaction. I am not sure that would be easy from the server side call. Since the code could be running as a service at some points the dataconnector design does not provide a hook for this sort of authentication that requires user interaction. I have been told that this is on the roadmap as part of Feature Request 47933.

I found these post that seems to be related to this problem on hubspot:

It seems you can do it with an API key, or with Oauth using batch calls.

Thanks, David. Your answer pointed me in a better direction. Twitter and Hubspot weren’t not implementing OAuth exactly the same. I manually got the refresh token that I can use to get the access token after it expires. I don’t have it completely working yet but I am a few steps closer. Thanks for the help.

DataProviders are a system for effectively controlling how information can be given from a source (by and large, a dataset’s document substance). They are intended to be: Simple to announce, design, and partner with a few wellspring of information.