• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hotmail API (post and put)  RSS feed

 
Jim Wei
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I am developing a program of sync contacts between windows live contacts and my website.


I have read MSDN and your discussions about windows live contacts. However, I am experiencing an problem with Hotmail "post" and put API, always returning an error.

My program can "GET" contacts content and "DELETE" contact. But it doesn't work when "POST" and "PUT", and return error code 400

I am writing with Python.

The followings are about my program.


urlput = urlbase + '''/Contacts/Contact(ab820b41-ee3a-45ca-b89d-30e44d297531)/Profiles/Personal/Nickname'''

bodyput = '''<Nickname>aaa</Nickname>'''

resput = restclient.Resource(urlput)

auth = '''WLID1.0 t="t=EwDQARAnAAAUaiat/x8TEXYT53ezUhJ8EEISAEWAABJykRRwX3H1fgRWJddMVsfXApW1ICXEpz/JwtmLHMmp3sgk5L9FTPHnoo4GW0502TNHcPYKqFs7e4REzOcVCZGBB+FlUYXkP/2S5Md8mjDnVTEajPXuhwYlNFSoqPVlxPXy0RzRLB2Y7WhkVHinZ5caaxlMON2lHRuN84QiJFwsA2YAAAgF3EVXllqLOCABTNqa6GGCmuKaSgwzFMuqyEJGChz8/Tsz92aVMuQHtpZR/p5yjSUB4zcxdk9XEGq59sWffEdv4EIrwUESF3DHqnczALr5uxQI2bjRWvpDKyfr2RPjLdOpC4OaAVcw0pFeFkmScZVlN6FkGtDO1SvjSbqKGjaboYHku9qP+DMgpNt0M16yzEgTDBD2JuLfi1MHXSOT5Zd29YqF4NR7PPmM6Kwm0CHyRl85Kqt2DnSen3arIz2s3t6bABLKjf8pDz+XaAQz7kO GTEpdhU+LVcjMhAFY1N+8e+G9GALOSoRJWgXnjXA8flRViYk/d6vEl9LmJxT6fQ80+bYnj5zdh1S6+QIjvWx9Z1jYAKbWDpb6j4NDOZeQ3kP5v1mDRXPTmplINwE=&"'''
headerput = {'Authorization':auth}

put = resput.put(payload=bodyput, headers=headerput)


DO you think there is something wrong ?

Looking forward to your answer,

thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!