hello.js icon indicating copy to clipboard operation
hello.js copied to clipboard

Tumblr: GET works, but not POST

Open thdoan opened this issue 8 years ago • 6 comments

I'm trying to do a simple task: post a photo to my secondary Tumblr blog from a local page on 127.0.0.1. So far I've managed to log in and get the access token by using an OAuth proxy. All GET-related API requests work, but POST requests are failing. Here's my code:

hello('tumblr').api('blog/myblog.tumblr.com/post', 'post', {...}).then(function(r) {
  console.log(r);
});

Here's the response I'm getting:

{"meta":{"status":401,"msg":"Unauthorized"},"response":[]}

I'm hoping this is not a bug and I'm just missing a step (or two) -- please advise.

thdoan avatar Apr 03 '16 15:04 thdoan

I think this has to do with the POST requests needing the token to be sent via the Authorisation header. Its a piece of work which is waiting for someone to pick up.

MrSwitch avatar Apr 04 '16 17:04 MrSwitch

@MrSwitch Thanks for the insight. I'm going to give https://github.com/ddo/oauth-1.0a a shot when time permits and report back here.

thdoan avatar Apr 05 '16 01:04 thdoan

@MrSwitch Any chance you've made progress on this? Just encountered the authorization error trying to post!

justinh00k avatar Mar 22 '17 08:03 justinh00k

no news

MrSwitch avatar Nov 07 '17 17:11 MrSwitch