MailChimp OAuth Issue

Hey Nigel, would you be able to expand on how to get this metadata containing the data centre?

Thanks!

Sure :slight_smile:

You need to do a GET on https://login.mailchimp.com/oauth2/metadata

So after I do a Signup with API …

image

I then do an API call straight after to get the DC and save it on the User.

You get some other useful fields back that I display to the user then they connect.

image

1 Like

Thanks! :raised_hands:

Hey guys!

I would really appreciate your help! We’ve been struggling for days on setting up OAuth for Hubspot CRM. I’m sure it’s a simple config issue but we can’t see the end of it.

We followed the above instructions carefully as we were running into the same issue than @help. We’re still getting the following error :

Capture d’écran 2020-02-19 à 17.47.52

Our OAuth workflow at the moment is the following :

The Schedule API Workflow is supposed to create an event when Signup/login with Hubspot is successful :

However, no ‘Hubspot events’ are being created, which I believe means the OAuth process isn’t working.

Here is the OAuth2 User-Agent Flow with API Connector config :

And here is the POST we’re using to retrieve the token :

When initializing the calls manually, we’re able to retrieve the authorization_code, access_token and refresh_token values correctly. However, when running it as a test-user, the error keeps popping up.

Any thoughts please @lottemint.md @NigelG @help ?

Check out the following screenshot, please:

Thanks for your answer @lottemint.md!

Even without using the ‘Get Token’ POST API, we’re still getting the following error :

Capture d’écran 2020-02-19 à 17.47.52

Any idea would be much appreciated!

Aha, you’re using the wrong link for Me request.
Try the following:
https://api.hubapi.com/integrations/v1/me


1 Like

But you have a problem here.
The thing is that https://api.hubapi.com/integrations/v1/me doesn’t return user_id and email. That means, your Bubble app cannot tie a HubSpot user with the Bubble user.

In that case, you can create a manual OAuth2 flow. That provides the possibility to store tokens in your custom fields.

1 Like

@lottemint.md thanks a lot for your continued help! :slight_smile:
https://api.hubapi.com/integrations/v1/me worked and the API is correctly set up.

In your opinion can we still use User-Agent flow to enable the user to grant access, and then manually tie the Bubble user to the Hubspot user?
Or should we use a different flow for the whole process?

My thought process:

  1. Make the ‘Access token endpoint’ point to an endpoint created in Editor
  2. Use GET /oauth/v1/access-tokens/:token to tie the Bubble user to the Hubspot user?

What do you think? Is that what you had in mind when you said ‘create a manual flow’?

1 Like

You’re welcome!

Yup, something like that.

Note: You can escape the 2. Use GET /oauth/v1/access-tokens/:token to tie the Bubble user to the Hubspot user? step in the case if you’re building the manual flow.
You can store a received token on the User level. Don’t forget about privacy! You need to hide this field from other users.

1 Like

Thanks @lottemint.md :+1:
I’ll try that asap and let you know how that goes

I’ll PM you now as well - happy to get help for other integrations

Hey

Can you tell why i get this error then?

My settings:

Hey @jacob,
May I know if you still have that error, please?

@lottemint.md @NigelG
Reviving this old thread as I’m having a very similar issue.

This is my set-up in the API Connector:

On a page I have a button with workflow Signup/login with APi - MailChimp, but when I click it I just get the following error:
image

Any ideas?

Hey there @orzdirect,

Run the workflow in debugger mode on the development version

1 Like

As above. Have the “signup with social” button on a page (it can just be a throwaway) and makes sure debug_mode=true is on the url.

1 Like

To close the loop, I followed the guide here: [Showcase] Manual OAuth2 Token Integration and it worked flawlessly. It’s not nearly as intuitive as I would have thought!

1 Like