Got a 'How do I' question? Join 'Ask a Trainer' Monday to Friday, 11am to 4pm ET for instant help and pro tips!

dot net core authorization example

JunedA7
Rookie
0 Votes

Hello, I am trying to build a blazor app to be able to sync my lists on a click.

I followed the steps from the API Docs on - "OAuth2 Authorization Code Flow" but I realized the popup to sign in to Constant Contact is not showing up.

 

I used the httpclient to make a call to 

https://authz.constantcontact.com/oauth2/default/v1/authorize?

 and added the following parameters ofcourse:

client_id={your_client_id}&redirect_uri=https%3A%2F%2Flocalhost%3A8888&response_type=code&scope=contact_data%20campaign_data%20offline_access&state=235o250eddsdff

I get a 200 and when I read my httpresponse as string I do see the login html page from constant contact but I dont see a popup?

Is there a dot net 6 example app that anyone can refer me to?


Thanks in advance!

2 REPLIES 2
JunedA7
Rookie
0 Votes

Hello, I am trying to build a blazor app to be able to sync my lists on a click.

I followed the steps from the API Docs on - "OAuth2 Authorization Code Flow" but I realized the popup to sign in to Constant Contact is not showing up.

 

I used the httpclient to make a call to 

https://authz.constantcontact.com/oauth2/default/v1/authorize?

 and added the following parameters ofcourse:

client_id={your_client_id}&redirect_uri=https%3A%2F%2Flocalhost%3A8888&response_type=code&scope=contact_data%20campaign_data%20offline_access&state=235o250eddsdff

I get a 200 and when I read my httpresponse as string I do see the login html page from constant contact but I dont see a popup?

Is there a dot net 6 example app that anyone can refer me to?


Thanks in advance!

Courtney_E
Moderator
0 Votes

Hello JunedA7, 

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Based on the response that you are getting, which appears to be the html for Constant Contact’s login page, I suspect you may be trying to execute the OAuth2 authorization behind the scenes.

 

The Authorization Request screen can only be accessed/authorized via a browser window or a pop up browser dialog, but you should only need to authorize/connect each account once via this method.

 

OAuth2 Authorization Code Flow - Step 2: Get Authorization

https://v3.developer.constantcontact.com/api_guide/server_flow.html#step-2-get-authorization

 

While our expertise is with our API itself as opposed to its implementation within any particular programming language, we are happy to answer any questions pertaining to Constant Contact’s API endpoints, functionality, and documentation.

 

The request for V3 application cod​​e samples is currently under review. However, we're currently still adding endpoints and capabilities to the V3 API, and do not plan to publish official SDKs or sample apps until that process is complete. Your feedback and experience with this request is essential to improving our product, so thank you for reaching out to us regarding this matter.

 

In the meantime, here are the example calls that are currently available for V3:

 

V3 Code Samples:

https://v3.developer.constantcontact.com/api_guide/tag_code_samples.html

 

Additionally, you can utilize our API Reference tester to test out the functionality of our available endpoints to see how they will work once programmed within your application:

https://v3.developer.constantcontact.com/api_reference/index.html

 

Please have a look and let us know if you have any other questions!


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up