I'm trying to set up a REST api resource in retool with constant contact's V3 API. However, I get stucked on setting up the OAuth2. Any one can help me or provide some guidance? This is the first time i'm dealing with REST API and OAuth.
In particular I'm confused with the URL parameters and Authentication/Token URL... since there is already an input space dedicated for Client ID in the setting page, is it still necessary to put that in the URL parameters? And how do I include that in the Auth URL?
Since Retool has support for the OAuth 2.0 authentication you don't need to worry about URL parameters, rather you can fill in the following fields. I've also included screenshots with relevant fields filled in. To learn more about how OAuth 2.0 authentication works check out our docs on authentication.
Base URL: https://api.cc.email/v3/ Headers: Authorization: Bearer OAUTH2_TOKEN Authentication: OAuth 2.0
You'll need to copy the OAuth callback URL into Redirect URI field in your Constant Contact application dashboard. Authorization URL: https://api.cc.email/v3/idfed Access Token URL: https://idfed.constantcontact.com/as/token.oauth2 Client ID: The API Key for your Constant Contact application Client Secret : Secret for your Constant Contact application. To get secret select "Generate Secret" in your Constant Contact application dashboard. Scopes: Up to you. I used account_read account_update contact_data.
Once you've got those fields filled out save your resource and then test the connection! I personally like to write a test query in the Query Library to make sure I'm getting the right results .
Hope this helps! Let me know if you have any more questions.
Thanks very much for your prompt reply with detailed guidance! I was able to establish the OAuth2 connection and successfully add the api as a resource! Thank you!