404: {"errors":[{"message":"Sorry, that page does not exist","code":34}]}


#1

Users attempting to log into Twitter through our site using oAuth is getting the following error:
404: {“errors”:[{“message”:“Sorry, that page does not exist”,“code”:34}]}

From the Twitter error codes:
34 Sorry, that page does not exist Corresponds with an HTTP 404 - the specified resource was not found.

Is this an issue on the Twitter side or is that error being kicked back as a generic message?


#2

Hi Jerry,

I’d verify that you’re using the right paths for everything – we retired unversioned and unsubdomained endpoints yesterday – so if you’re using twitter.com/oauth/* you should use api.twitter.com/oauth/* and if you’re using API urls like twitter.com/statuses/user_timeline you should use URLs like api.twitter.com/1/statuses/user_timeline instead. See [node:10803] for more info.


#3

Hi Taylor
I am using api.twitter.com/oath/* but still it is giving 404 error.


#4

Using the following endpoints:
https://api.twitter.com/oauth/access_token
https://api.twitter.com/oauth/authenticate
https://api.twitter.com/oauth/authorize
https://api.twitter.com/oauth/request_token

Flow:

  • User clicks “Sign in with Twitter” button my site
  • User goes to Twitter to signing
  • User authentication completes on Twitter.com
  • User is returned to my site with error 34 (404)

I’ve verified all of the endpoints are api.twitter.com and versioned.


#5

To which specific API request are you getting a 404 error though?

Do you get to the point of having the access token returned from oauth/access_token? Do you make another request once that’s complete? A lot of folks then request account/verify_credentials in that sequence and if your code is trying to call twitter.com/account/verify_credentials.json or twitter.com/1/account/verify_credentials.json or api.twitter.com/account/verify_credentials (and so on with all variations of invalid URLs), the 404 would be expected now.


#6

Issue resolved on our end. Was missing the /1 on the verify endpoint.


#7

Could anyone help me modify my code to get it to work now? We’re not the only library using the exact same code, and a bunch of us are stumped. I just want the latest tweet to show up on our website (not in a fancy box or anything, just the tweet).

This is what I had that was working until yesterday:

NPL Tweets

    -->

    I’ve tried changing that last line to the url http://api.twitter.com/1/statuses/user_timeline.json?count=1&exclude_replies=true&screen_name=nashualibrarynh and variations on that that I’ve found in the threads here. But clearly I’m still missing something. I know the URL by itself works, I can see the raw feed. But it’s not displaying on the website.


    #8

    Well, my previous comment is still in moderation. But I got it working. Somehow or other.


    #9

    i’m use this code
    $user = twitter_process(‘https://api.twitter.com/1/account/verify_credentials.json’);
    but it’still not working :frowning:


    #10

    Solved :))


    #11

    Be sure that all the API calls except /oauth is properly versioned.
    ie. http://api.twitter.com/account/verify_credentials.json
    should be: http://api.twitter.com/1/account/verify_credentials.json


    #12

    I’ve nearly finished the conversion to 1.1 and things seem to be going well but i’m having problems with users/lookup.

    https://api.twitter.com/1.1/users/lookup.json

    All other calls are working fine with 1.1 but this one does not. It worked fine with version 1 of the API but with 1.1 it returns a 4.4 error.

    Any ideas?


    #13

    What’s the response code that you get in this case? Perhaps your OAuth is not functioning correctly.


    #14

    I have
    An error occured while calling the Twitter API

    404: {“errors”:[{“message”:“Sorry, that page does not exist”,“code”:34}]}


    #15

    Thanks


    #16

    I don’t get it. So twitter just changes the api interface without telling people who are using it? It gets fixed by (1) us noticing it’s not working anymore and (2) going a google search on the error message and (3) getting lucky that it already happened to someone else.

    Seems rather rude of twitter.


    #17

    We’ve tweeted and made posts about this topic several times over the past few years. In March we more strongly announced the schedule for retiring these URLs and then extended that schedule for longer than planned.

    If you’re working with the Twitter platform in any capacity, it’s best to keep up to date by following @twitterapi and our blog at https://dev.twitter.com/blog


    #18

    What did you change it to to make it work? thanks!


    #19

    error "
    s:1230:"HTTP/1.1 404 Not Found
    Date: Tue, 30 Oct 2012 09:43:28 GMT
    Status: 404 Not Found
    Pragma: no-cache
    X-RateLimit-Reset: 1351592231
    X-RateLimit-Remaining: 119
    X-Runtime: 0.01959
    X-RateLimit-Class: api
    X-Transaction: 9bfcd84b01cdd2e3
    Expires: Tue, 31 Mar 1981 05:00:00 GMT
    Last-Modified: Tue, 30 Oct 2012 09:43:28 GMT
    Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
    X-RateLimit-Limit: 150
    X-Frame-Options: SAMEORIGIN
    X-MID: 3cac4f34bf90b71d3283432b5b2cf046547b759e
    Set-Cookie: k=10.36.21.129.1351590208464275; path=/; expires=Tue, 06-Nov-12 09:43:28 GMT; domain=.twitter.com
    Set-Cookie: guest_id=v1%3A135159020847321444; domain=.twitter.com; path=/; expires=Thu, 30-Oct-2014 21:43:28 GMT
    Set-Cookie: _twitter_sess=BAh7CCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%250ASGFzaHsABjoKQHVzZWR7ADoPY3JlYXRlZF9hdGwrCNrjDbE6AToHaWQiJWRk%250AZjg4YWIzNzk2NTg4NjEzMzJjNGE4N2MyNTExMjJl–d4566db3725a93d9201adb731d8b0dc6f5f8b2c2; domain=.twitter.com; path=/; HttpOnly
    Vary: Accept-Encoding
    Content-Type: application/xml; charset=utf-8
    Content-Length: 116
    Server: tfe

    <?xml version="1.0" encoding="UTF-8"?> Sorry, that page does not exist "; "

    my code

    $c = curl_init();
    curl_setopt( $c, CURLOPT_URL, “http://api.twitter.com/statuses/user_timeline/plustrafik.xml?callback=twitterCallback2&count=25” );
    curl_setopt( $c, CURLOPT_HEADER, 1 );
    curl_setopt( $c, CURLOPT_RETURNTRANSFER,1);
    curl_setopt( $c, CURLOPT_TIMEOUT, 60 );

    $response = curl_exec( $c );
    $responseInfo = curl_getinfo($c);

    echo curl_error($c);
    curl_close( $c );


    #20

    Like many afflicted by this, you’re using an unversioned path. You want:

    http://api.twitter.com/statuses/1/user_timeline/plustrafik.xml?callback=twitterCallback2&count=25

    Keep in mind that that URL will expire in March 2013 and you’ll need to move to API v1.1 by then.