Issue with API after 6.2 update
-
I have a python program that automatically updates pages/posts on my websites. Recently I started getting this error only on the websites with 6.2 update:
400 - Bad Request | Your browser sent a request this server could not understand.
Here is how I connect to the API:
username="example" url ='https://www.example.com/wp-json/wp/v2' password='example' if post: url += '/posts/' else: url += '/pages/' creds = username + ':' + password cred_token = base64.b64encode(creds.encode()) header = {'Authorization': 'Basic ' + cred_token.decode('utf-8')} post = { 'content' : content } blog = requests.post(url + postid, headers=header, json=post)
My question is did anything change in the API? why I’m getting this error?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Issue with API after 6.2 update’ is closed to new replies.