jublo / codebird-php

Easy access to the Twitter REST API, Direct Messages API, Account Activity API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.
https://www.jublo.net/projects/codebird/php
GNU General Public License v3.0
777 stars 235 forks source link

authenticity_token_error when using Proxy #193

Closed dkoether closed 5 years ago

dkoether commented 7 years ago

Hello everyone,

whenever I try to order an accesstoken it works fine on my local machine. Now I have a different system with a proxy and get this error:

{"errors":[{
   "code":99,
   "message":"Unable to verify your credentials",
   "label":"authenticity_token_error"
}]}

Here is my code:

$twitter = new Codebird();
// Set proxy settings
$twitter->setProxy('10.20.30.40', '1234', CURLPROXY_HTTP);
$twitter->setProxyAuthentication('username:password');

$twitter->setConsumerKey('XXXXXXX', 'XXXXXXX');
$reply = $twitter->oauth2_token();

I can affirm that the consumerKey is correct. Am I missing something?