cancel
Showing results for 
Search instead for 
Did you mean: 

API 401 error ASP.NET

Occasional Participant

API 401 error ASP.NET

hello...I have just implemented the api into my testing application and using the pages provided on Github to test, I am getting a 401 error.  I have setup the API key with the username and password in the web.config file.  What am I missing?  Thanks for your help!

-pb100

8 REPLIES 8
CTCT Employee

Re: API 401 error ASP.NET

Hi,

 

Are you using the newest .NET wrapper here? If you've double checked your API Key, username, and password values (make sure there aren't any pasting issues or spaces), make sure that your redirectURL value is set consistently with what is listed as the redirect uri for the key in Mashery.  

 

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Participant

Re: API 401 error ASP.NET

Hi Shannon...I was using the .NET examples found through the links on your developer site.  The link you've sent is completely different.  Is there anyway to make the one I have work, I've already spent a good bit of time developing with it.  Here is what I am using:  https://github.com/constantcontact/Constant-Contact-Dot-Net-ASP-Contact-Forms.  Thanks for your help.

Occasional Participant

Re: API 401 error ASP.NET

Also, can you please send a link to the CTCT.dll file, I can't seem to find it anywhere in the wrapper you sent.  Thanks!

CTCT Employee

Re: API 401 error ASP.NET

Hi Pam,

 

You can find the dll's here in the project.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Participant

Re: API 401 error ASP.NET

Hi Shannon...Thank you but those do not work.  The README in the newest SDK says to install the CTCT.dll.  The link you sent does not include that dll.  I do have the other dlls installed and the code from the newest SDK does not work as it is looking for the CTCT.dll.  Thanks for your help.

Occasional Participant

Re: API 401 error ASP.NET

Thank you for your help.  I understand now that the Sample Code I was using is for V1 and needed a different API key from the old link (http://community.constantcontact.com/t5/Documentation/API-Keys/ba-p/25015).  Also, for anyone else trying to implement the new code, the dll to install is named moq.dll and is in the CTCTWrapper > CTCTWrapper.UnitTest directory of the CTCTWrapper (https://github.com/constantcontact/.net-sdk/tree/master/CTCTWrapper/CTCTWrapper.UnitTest).  It is not called CTCT.dll as specified in the README instructions.

 

I now have the V1 sample code working with the V1 API key!

Honored Contributor

Re: API 401 error ASP.NET

Hello Pam,

 

Thank you so much for providing this fix that you found! I will make sure to pass this on so that we can get the README updated properly. If you have any more issues, please feel free to reply to this post!

 

Sincerely,

Elijah G.

Tier 2 Support

Elijah G.
API Support Engineer
Moderator

Re: API 401 error ASP.NET

Hello,

 

The readme is correct in saying that ctct.dll is required in your program. You don't actually have the dll, but by building the project you will have it. The project output produces the dll.

 

I hope that helps. Thanks!

Nick Galbraith
Support Engineer