I'm trying to use NAVER API, which is the Korean site.
There is an example in developer site, but only php code exists so I have some trouble in dealing with it using Python 3.4
This API uses oauth2 and I successfully get access-token.
But when I do final request with this access token, It shows "Authentication failed" errors.
If you see 'articlePost.php' section in https://nid.naver.com/devcenter/docs.nhn?menu=CafeTutorial, only 'Authentication' is included in header.
This is part of Python code :
.
.
access_token = response['access_token']
headers = {'Authorization': 'Bearer ' + access_token}
r = requests.post("https://openapi.naver.com/cafe/articlePost.json", headers=headers, data={'clubid':11262350, 'subject':"hi", 'content':'bye', 'menuid':97})
The thing that I want to know is whether I used suitable header compared with php code.
Thanks