02-16-2011 05:38 AM
Hi Constant Contact Team / Other friends,
For the past two days i am struggling with oauth mechanism for connecting constant contact accounts, but could not able to success in my task. i am using c# and asp.net to connect to the website. Here is my url construction, for readability i breaked the url address code
I am getting the following error as mentioned below,
HTTP Status 401 - Invalid signature for signature method HMAC-SHA1
i am able to figure it out where i am going wrong while genrating the oauth_signature i am using the OAUTHBase.cs file from this link from oauth website, the constant contact api documentation clearly states that "You should use the POST method when accessing this URL and always use SSL." After doing some research i came to know that we need add certificates along with the requests when api calls are made to 3rd party using SSL.
I am struck with the first step1 not able to proceed further, My question is whether constant contact is providing any certificates then how to get them, please let me know if any one has solved this type of problems, or whethere i am struck with some other issue.
02-16-2011 09:57 AM
Hi. I would strongly recommend checking out the DevDefined OAuth Library. This library is recommended by OAuth.net and has great documentation that can likely help you with your OAuth Integration.
Step 1 of this library would appear as follows:
As I've mentioned, we are looking to create an C#/ASP.NET example of this for demonstration purposes in the near future to help with this. If you have any questions please let us know. Thanks.
02-17-2011 04:29 AM
I have checked the above link as specfieid and was able to successfully get the unauthorized request token, but after some time the application is giving the following error. I am using the code dll which are given in the above link. Please let me know any chance of resolving this issue.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 126.96.36.199:443
Source File:c:XXXXXXXX\Default.aspx.cs Line: 96
No connection could be made because the target machine actively refused it 188.8.131.52:443
02-17-2011 06:57 AM
Hi i have solved the problem,
Like i have reached up to 3 rd step in this document url as given below.
now i have oauth_token and oauth_token_secret keys, see if i want to access the below url and get the all the campaings for a specific user in which i generated the keys for that account, do i still need the username and password to get the campaigns, if the username and password is still required? please let me know in this regard.
02-17-2011 08:27 AM
You will no longer need the accounts password, but you will still need to get the username to make API calls.
If you have any questions let us know.
02-17-2011 09:29 AM
Hi Thanks for you reply,
Still i have some questions. when i send the requests like give below i am getting error and the details are.
May i know why the second request is failing to fetch the data , i am able to fetch the data for 2nd request alos using basic authentication, basically i am lookin for summary data in the second request url. now we are moving to oauth. Please let me know further to proceed/modify my logic.