403 Forbidden: The server understood the request, but is refusing to fulfill it.

2,214 views
Skip to first unread message

ldnStreetLife

unread,
Mar 21, 2009, 8:19:11 PM3/21/09
to Twitter Development Talk
In PHP I've setup some test scripts following the exact example found
here https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4

Everything looks good and it works to the point where can come back
into my application from Twitter after authorizing access. I can make
the acount/verify_credentials.xml request and get a valid response
with a full result set, but when I make the status/update.xml request
I am returned "403 Forbidden: The server understood the request, but
is refusing to fulfill it."

I have setup my application to get read/write access.

When I go to http://twitter.com/account/connections I get "Something
is technically wrong. Thanks for noticing—we're going to fix it up and
have things back to normal soon." so it might just be something I have
to wait out till it's fixed on the server, but I'm new to all this so
maybe I'm missing something.

Thanks - Rich

Nick Arnett

unread,
Mar 21, 2009, 9:35:55 PM3/21/09
to twitter-deve...@googlegroups.com


On Sat, Mar 21, 2009 at 5:19 PM, ldnStreetLife <londonst...@gmail.com> wrote:

... when I make the status/update.xml request

I am returned "403 Forbidden: The server understood the request, but
is refusing to fulfill it."

Just a guess, but is it possible you're doing a GET rather than a POST?  IIRC, you'l get that error in that case.

Nick 

ldnStreetLife

unread,
Mar 21, 2009, 10:53:21 PM3/21/09
to Twitter Development Talk
Thanks, I just checked on that and it's definitely a POST.

On Mar 21, 9:35 pm, Nick Arnett <nick.arn...@gmail.com> wrote:
> On Sat, Mar 21, 2009 at 5:19 PM, ldnStreetLife
> <londonstreetl...@gmail.com>wrote:

ldnStreetLife

unread,
Mar 22, 2009, 11:09:50 AM3/22/09
to Twitter Development Talk
Okay I figured out what the problem was. The example I was following
had a bad API call:

$to->OAuthRequest('https://twitter.com/status/update.xml', array
('status' => 'Test OAuth update. #testoauth',), 'POST');

should be:

$to->OAuthRequest('https://twitter.com/statuses/update.xml', array
('status' => 'Test OAuth update. #testoauth',), 'POST');

I guess the fact that the response was telling me it is forbidden,
coupled with the fact that my http://twitter.com/account/connections
page is showing an error was throwing me off. Doh!

On Mar 21, 8:19 pm, ldnStreetLife <londonstreetl...@gmail.com> wrote:
> In PHP I've setup some test scripts following the exact example found
> herehttps://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4
>
> Everything looks good and it works to the point where can come back
> into my application from Twitter after authorizing access.  I can make
> the acount/verify_credentials.xml request and get a valid response
> with a full result set, but when I make the status/update.xml request
> I am returned "403 Forbidden: The server understood the request, but
> is refusing to fulfill it."
>
> I have setup my application to get read/write access.
>
> When I go tohttp://twitter.com/account/connectionsI get "Something

Abraham Williams

unread,
Mar 22, 2009, 12:51:23 PM3/22/09
to twitter-deve...@googlegroups.com
Thanks for finding that typo.
--
Abraham Williams | http://the.hackerconundrum.com
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.
Sent from: Madison WI United States.

ldnStreetLife

unread,
Mar 22, 2009, 5:22:10 PM3/22/09
to Twitter Development Talk
No problem at all, thank you so much for the example code it's been
incredibly helpful!

On Mar 22, 12:51 pm, Abraham Williams <4bra...@gmail.com> wrote:
> Thanks for finding that typo.
>
> On Sun, Mar 22, 2009 at 10:09, ldnStreetLife <londonstreetl...@gmail.com>wrote:
>
>
>
>
>
> > Okay I figured out what the problem was.  The example I was following
> > had a bad API call:
>
> > $to->OAuthRequest('https://twitter.com/status/update.xml', array
> > ('status' => 'Test OAuth update. #testoauth',), 'POST');
>
> > should be:
>
> > $to->OAuthRequest('https://twitter.com/statuses/update.xml', array
> > ('status' => 'Test OAuth update. #testoauth',), 'POST');
>
> > I guess the fact that the response was telling me it is forbidden,
> > coupled with the fact that myhttp://twitter.com/account/connections
> > page is showing an error was throwing me off.  Doh!
>
> > On Mar 21, 8:19 pm, ldnStreetLife <londonstreetl...@gmail.com> wrote:
> > > In PHP I've setup some test scripts following the exact example found
> > > herehttps://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4
>
> > > Everything looks good and it works to the point where can come back
> > > into my application from Twitter after authorizing access.  I can make
> > > the acount/verify_credentials.xml request and get a valid response
> > > with a full result set, but when I make the status/update.xml request
> > > I am returned "403 Forbidden: The server understood the request, but
> > > is refusing to fulfill it."
>
> > > I have setup my application to get read/write access.
>
> > > When I go tohttp://twitter.com/account/connectionsIget "Something
Reply all
Reply to author
Forward
0 new messages