Hi Developers,
I'm happy to announce that the upload method for the new profile banner feature is now available in API v1. API v1.1's profile banner upload feature will be available in the coming weeks.
As you probably have already noticed, you'll find a HTTPS-based "profile_banner_url" within v1 and v1.1 user objects belonging to users who have uploaded a profile banner. This URL can be easily manipulated to yield an image sized appropriately for your context: web, ipad, and mobile. Each of these representations also has a high-resolution "retina" variation. In the future, we'll have a method available that will denote these variant URLs so you don't need to munge them, but for now you can read more about profile banner variations.
POST account/update_profile_banner works similarly to profile background and avatar upload methods, with the additional ability to give us hints about the image's dimensions and how the user may want it offset. POST account/remove_profile_banner is used to remove an already uploaded profile banner. Both of these methods will be available in API v1.1 soon.
We're excited to see the programmatic profile design possibilities you'll build with these new profile banners.

Replies
Hi Taylor,
thanks for providing this API and writing up the docs :-) My users have been pretty excited about this profile banner ...
Just one question: I've seen that some accounts have a different profile banner url with the ending "/live" (like @AppStore.) What's that about?
@janole
Hi @janole!
What @AppStore has is techincally not a profile banner but a "enhanced profile page," which was part of our commercial offerings for advertisers. Most who had such a page have moved on to the improved profile banner, but not everyone has yet. You should see little to none of these in the coming weeks.
I'm trying to use the new endpoint and I'm getting the following response:
{"error":"Could not authenticate with OAuth.","request":"/1/account\/update_profile_banner.json"}
The documentation has two different endpoints:
* https://api.twitter.com/1/account/update_profile_banner.json
* https://api.twitter.com/1/account/profile_banner.json (this was listed as an example request on https://dev.twitter.com/docs/api/1/post/account/update_profile_banner)
I tried them both and substituted the "api" subdomain for "upload" just in case. The upload subdomain resulted in an HTML response and the other 2 had the oauth error. I also tried API version 1.1 and got the following response:
{"errors":[{"message":"Bad Authentication data","code":215}]}
FYI I'm using TheMattHarris' php library.
Thanks
Ollie
Sorry for the confusion, I've rectified the docs in this area -- the endpoint is indeed https://api.twitter.com/1/account/update_profile_banner.json
If you can share the code you're using to execute this, I can perhaps help you out.
Here is some example code using tmhOAuth and uploading from a file submitted via a web-based upload dialog.
// The end-user has uploaded the image on the previous page// if we are setting the banner we want it to be displayed}You will likely find it best to leverage multipart content-type.
Apologies, it was my bad! My code was virtually identical to yours. I didn't realise the oauth token and secret were null in the db record I was using. Doh! The other endpoint I tried (users/show) obviously didn't require auth, so it didn't complain when I'd send bad credentials.
Awesome that this API has been added though :)
Thanks
Will
profile_banner_urlattributes always be an HTTPS URLs? It seems incongruous forprofile_image_urlto be an HTTP URL whileprofile_banner_urlis an HTTPS URL. I understand why this might be inconsistent for backward compatibility in API v1 but it would be nice if it was made consistent in API v1.1.As a service, we're moving to requiring SSL for more and more but we're not all the way there yet. If there's a point where there will be SSL URLs exclusively, it would likely be a future (more dramatically different) version 2 of the API rather than API v1.1. profile_banner_url will indeed always be SSL.
Also, the documentation for
POST account/update_profile_bannersays that it may return HTTP 422 if the image is too large, however 422 is not listed as a possible HTTP response code at https://dev.twitter.com/docs/error-codes-responses.Will add that in, thanks.
Another incongruity between
POST account/update_profile_imageandPOST account/update_profile_banneris that, on success, former returns a JSON user object, while the latter returns an empty body. It would be nicer of these two methods had a similar response.I would prefer that as well, I'll see if it's possible -- though the profile_banner_url returned in the response may not yet be available at the time of the response.
I believe that's also the case for
POST account/update_profile_imageandPOST account/update_profile_background_image, but those always return a user object. It would be nice ifPOST account/update_profile_bannerwas consistent with these other resources.The profile banner upload and remove API is now available in API v1.1:
* POST account/update_profile_banner
* POST account/remove_profile_banner
Additionally, we've added a convenience method for those who are not fans of string manipulation:
* GET users/profile_banner
episod...how to get profile image ..? which we get in v1... that type url ..?
I love it thank you
Hi, every time I try to use this I get 422 return code...I have tried uploading an image from my computer as well as from a url, regardless of image size or dimension I get the 422 error :( any ideas? I am using tmhoauth, posting to 1/account/update_profile_banner, with 'banner' as sole param
got it working, was handling the image path as a string rather than a file :)
Welcome to anaknilai bloggers group........
Hi,
I'm having a tough time with this API call. I have oauth keys for a user and I'm trying to send the banner as a base64 encoded string, as the documentation says I can. I keep getting 502 Bad Gateway responses (in HTML, when I request json).
Is this API ok or does it have any health issues? Should my usage be ok?
I hope you can help
I just discovered this (not very well named) thread talking about the same issue: https://dev.twitter.com/discussions/11025
Is there anything that can be done about this?
hi can any body tell me how I can connect to Twitter API using JAVA and pass parameter.
This api method is broken, i tried with several twitter python libraries(the Twitter recommended ones included) and they all sent internal error, i even tried with the curl command twitter gives you and it fails.
hi, i am trying to update profile banner using api v 1.1 but it returns {"errors":[{"message":"Internal error","code":131}]}
i have submit base64 encodec banner image , width, height, offset_top, offset_left and access tokens
let me know what was the error here i dont understand what is "Internal error"