cancel
Showing results for 
Search instead for 
Did you mean: 

Simple OATH2 C# code for console application login

SOLVED
Occasional Contributor

Simple OATH2 C# code for console application login

Does anyone have some simple C# code to return the Access Token given the the Username, password and API Key?  I'm trying to build several C# console applications.

 

Thanks,

Tony

2 REPLIES 2
Highlighted
Occasional Contributor

Re: Simple OATH2 C# code for console application login

I guess I'm confused if I even need to authenticate this way.  Do I just use the API Key and Access Token?

Honored Contributor

Re: Simple OATH2 C# code for console application login

Hi Tony,

 

You can simply use the API Key and Access Token that is generated through the MAshery I/O Docs. The OAuth flow is provided specifically for use with applications that want to connect with multiple Constant Contact accounts. If you are working to create console applications that would be expected to access multiple unique Constant Contact applications, you would likely need a database and a secondary application to handle the OAuth flow so that you can gather the Access Tokens for those accounts.

 

Also as a last note, I want to clarify that an API key is used to identify your application, and an Access Token identifies and authenticates a Constant Contact account. There should be 1 API key per unique application, and there can be any number of Access Tokens that involve a given API key.

 

If you have any questions about this, please let me know!

 

Best Regards,

Elijah G.
API Support Engineer