Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postman settings to upload image to Twitter? #2166

Closed
MicrocontrollersAndMore opened this issue Jul 6, 2016 · 7 comments
Closed

Postman settings to upload image to Twitter? #2166

MicrocontrollersAndMore opened this issue Jul 6, 2016 · 7 comments
Labels
support How do I ... ? Can I ... ?

Comments

@MicrocontrollersAndMore
Copy link

  1. Postman Version: 4.4.1
  2. App (Chrome app or Mac app): Chrome
  3. OS details: Windows 7
  4. Is the Interceptor on and enabled in the app: tried with and without Interceptor enabled
  5. Did you encounter this recently, or has this bug always been there: only tried recently
  6. Expected behaviour: successfull POST
  7. Console logs (http://blog.getpostman.com/2014/01/27/enabling-chrome-developer-tools-inside-postman/ for the Chrome App, View->Toggle Dev Tools for the Mac app): see screenshots
  8. Screenshots (if applicable)

I posted this same info to Stack Overflow:

http://stackoverflow.com/questions/38195367/postman-settings-to-upload-image-to-twitter

But I figured I would re-post to here as a more direct answer may be available. I'm trying to use Postman to post an image to Twitter as a test before I write a phone app to do the same. No matter what settings I choose I can't get an image to upload successfully. I found some posts on here about an image upload bug from more than a year ago, but those seem to have been fixed/closed. Is this a bug or am I doing something wrong? Screenshots:

post1

post2

post3

post4

@abhijitkane
Copy link
Member

@MicrocontrollersAndMore I was able to upload an image to twitter (see screenshot). In the "form-data" section, change the type of the "media" parameter to "file", and select the image file.
screen shot 2016-07-06 at 15 28 20

@abhijitkane abhijitkane added the support How do I ... ? Can I ... ? label Jul 6, 2016
@MicrocontrollersAndMore
Copy link
Author

Thanks for the update. Upon further review of the Twitter API, I realize that there are 3 steps to performing an image upload to Twitter and that I was only doing the first of the three. Since Postman was doing everything correctly all along I'm going to close this issue.

@QifanViseo
Copy link

@MicrocontrollersAndMore I got the same issue like Code 32 could u pls tell me what u have done to solve this ?
Thx a lot.
c6494d0d8b557bd8e2745861ee887a5c23a6ba35

@charlesr1971
Copy link

charlesr1971 commented Dec 9, 2021

@MicrocontrollersAndMore

I agree.

Please don’t close this.

I have had no success trying to upload an image using Postman and Twitter’s media/upload endpoint? Please can someone share the following details:

  1. headers
  2. authorisation
  3. body

For some reason, there are 10 request headers automatically created by Postman. I cannot remove them.

I am using oAuth 1.0a

@charlesr1971
Copy link

Finally after many hours of head scratching, I got it to work. Here are the settings for the latest version of Postman:🙂

57113BAE-CBA5-4B70-A996-D3A6D510991A
FD99C7F5-2223-4225-B167-FE1C2B858EB4
53998667-F780-452B-AC94-1E4CC775C39F

@fatima-gloqal
Copy link

Hi i'm having problem with upload media when i did the same thing it gives this error , i just signed normally to developer portal and i added the oauth1 authorization in postman
{
"errors": [
{
"message": "You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api#v2-access-leve",
"code": 453
}
]
}

@charlesr1971
Copy link

@fatima-gloqal It’s really important that you set read, write & direct message permissions for your Twitter App and then you need to regenerate all your consumer/access/bearer tokens & keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support How do I ... ? Can I ... ?
Projects
None yet
Development

No branches or pull requests

5 participants