Internal Error 131 on account/update_profile_background_image


I’m using the CodeBird PHP SDK if that’s relevant but I keep getting 131 on trying to update my profile background image via the API.

Here’s the relevant code:

$background = "/path/to/file.jpg";
$background_info = getimagesize($background);
    $response = $cb->account_updateProfileBackgroundImage(array(
        'use' => "1",
        'image' => "@{$background};type={$background_info['mime']};filename={$background}",
        'tile' => "1",
        'include_entities' => "false",
        'skip_status' => "1"


Actually, it’s random, sometimes it goes through and other times I get this error.


Did you resolve this? I’m also getting the same problem. In my case, it’s always http status 500 and error code 131.

I’m building own Twitter REST API library so may do something wrong. Following is the http request;

POST /1.1/account/update_profile_background_image.json?tile=false&use=true HTTP/1.1
content-length: 109434
mime-version: 1.0
content-type: multipart/form-data; boundary="boundary-1229gbddjzhngbwue68"
user-agent: sagittarius.http/0.4.12

Content-type: application/octet-stream
Content-transfer-encoding: base64
content-disposition: form-data; name=image; filename=image.png



I gave up and just coded it to wait and retry a couple of times if it hits an error. Be aware that it occasionally will throw errors several times in a row.