Basic Auth requires that the username and password are Base64 encoded,
concatenated together with a colon (":") between them. Be sure that
you're encoding the username and password without applying URL
encoding or HTML escaping. An ampersand ("&") will never occur in a
Base64 encoded string.

An example, in Ruby:

>> Base64.b64encode('bob:pass&word')
=> "Ym9iOnBhc3Mmd29yZA==\n"

On Tue, Jul 21, 2009 at 04:35, RV<> wrote:
> Hi,
> I have been using the twitter api for 2 weeks now and everything seems
> to work, but i have 1 problem with a certain user to get his user
> feed. Í'm using curl to retrieve the data but im getting the following
> error:
> <?xml version="1.0" encoding="UTF-8"?>
> <hash>
>  <request>/statuses/user_timeline.xml</request>
>  <error>This method requires authentication.</error>
> </hash>
> Out of the 25 twitter users im collecting data from this one is the
> only one that is giving me problem. I have checked if the supplied
> username + password are correct and they are. There is one thing
> though this user uses special character in his password (&-sign). I've
> tried urlencoding the password and using htmlentities, both resulting
> in the same error. Does anyone know a sollution to this problem?
> Best Regards,
> RV

Alex Payne - Platform Lead, Twitter, Inc.

Reply via email to