I'm simulating running Constant Contact as one of our clients would by using their Constant Contact Account name and password, which we've received permission to do. When "Get"ing the following URI, I'm able to download their active lists no problem
However, when I attempt to get the following URI, I receive the 401 error listed above
I'm using the exact same credentials string in both cases.
WinHttpReq.SetCredentials Credentials, ConstantContactAccountPassword, HTTPREQUEST_SETCREDENTIALS_FOR_SERVER
The interesting thing is that if I login as my developer account and run the same code, I get both lists with no errors.
My first thought was that I was given the wrong account name or password, but I know it's correct because I get the correct list of lists. So I know at least that part is correct. I also know that the credentials string is correct because, again, I get results when just pulling a list of lists. And as I mentioned, I can login under my developer account and have both sections work fine, so I'm at a loss.
We hope to be able to roll our Constant Contact functionality out to this client in the near future Any thoughts or suggesions would be greatly appreaciated.
There does not appear to be anything wrong with the string itself. When I perform a get on this (inserting my account information), I am able to pull the listing of contacts without receiving a 401 error.
Would you be able to post the code that you are using so that we can take a look at that? If you'd rather email that in, you can feel free to send it to our webservices team and we can look at it there. Thanks!
Hi, sorry, upon further testing I've determined that the initial fetch from Constant Contact is working correctly. The error occurs when I go to fetch the next 50 records. Since I don't have any lists in my developer account with more than 50 contact I've never run into this before, which explains why one account gets the error and one account doesn't.
Okay, so apparently you have to reset the credentials on the http object for each "send" you submit. Doing so resolves the issue.
Don't you love it when issues just work themselves out?