400 Bad Request: Response realm name {0} does not match system realm name of {1}

Participant

400 Bad Request: Response realm name {0} does not match system realm name of {1}

Currently trying to connect via OAuth.  When I request a token I get:

 

"The request sent by the client was syntactically incorrect (Response realm name {0} does not match system realm name of {1})."

 

I am using python and I tried supplying a realm name in the headers.  I am currently developing on my local machine localhost:8000 using Django.

 

This is how I am connecting:

 

consumer = oauth.OAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET)

sha1 = oauth.OAuthSignatureMethod_HMAC_SHA1()

connection = httplib.HTTPSConnection('oauth.constantcontact.com')

 

oauth_request = oauth.OAuthRequest.from_consumer_and_token(consumer, callback='https://localhost:8000/social/ctct/auth/', http_url='https://oauth.constantcontact.com/ws/oauth/request_token', http_method='POST')

oauth_request.sign_request(sha1, consumer, None)

connection.request('POST', 'https://oauth.constantcontact.com/ws/oauth/request_token', headers=oauth_request.to_header())

 

params are as follows:

{'oauth_nonce': '95246787', 'oauth_timestamp': 1312309636, 'oauth_consumer_key': 'XXX', 'oauth_signature_method': 'HMAC-SHA1', 'oauth_version': '1.0', 'oauth_signature': 'SIG', 'oauth_callback': u'https://localhost:8000/social/ctct/auth/'}

 

 

 

2 REPLIES 2
Employee

Hey Wendy,

 

I will look into this for you but it may take me some time to get my resources together.

 

Thanks,

Ryan Davis
Quality Engineer

I have found the issue.  I'll post a snippet of connecting using python when I complete my integration.  Myabe others will find it useful.  Thanks for the response though.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page