I'm having trouble getting started. I've constructed a basic Http GET for a list of contacts, but it returns a 401 error. Everything looks good to me. Can anyone point out what I'm doing wrong?
Here's some sample code. ColdFusion is my language of choice:
<cfset Variables.username = "{myUsername}" />
<cfset Variables.password = "{myPassword}" />
<cfset Variables.apiKey = "{myAPIkey}" />
<cfset Variables.httpUsername = Variables.apiKey & "%" & Variables.username />
<cfhttp
url = "http://api.constantcontact.com/ws/customers/#Variables.username#/contacts"
method = "GET"
username = "#Variables.httpUsername#"
password = "#Variables.password#"
result = "Variables.response"
/>
My only guess at this point, is that since {myUsername} contains spaces, commas, and other special characters, that it's causing a problem in the http call. Do such special characters need to be HTML encoded?