[Developers] [+] Using CURL for freebase login
Tyler Pirtle
tyler at metaweb.com
Tue Jun 16 17:53:47 UTC 2009
Niall O'Higgins wrote:
> Try it this way:
>
> curl -d 'username=foo' -d 'password=bar' http://www.sandbox-freebase.com/api/account/login
>
Also, you should save the cookies,
curl -b freebase-login-cookies -d 'username=foo' -d 'password=bar' http://www.sandbox-freebase.com/api/account/login
then, when running more curl requests,
curl -b freebase-login-cookies
http://www.sandbox.com/api/service/mqlwrite.or.something?
> On Mon, Jun 15, 2009 at 06:03:10PM -0400, Matthew Chan wrote:
>> Hi,
>>
>> I've tried all day to get freebase to respond to my php authentication
>> function.
>>
>> I've narrowed it down to my Curl query I think. Does anyone know what is
>> wrong with this?
>>
>> Thanks in advanced.
>> Matt
>>
>> [matthew at laptop php]$ curl --data-urlencode "{'username':'****',
>> 'password':'****'}" http://sandbox.freebase.com/api/account/login
>> {
>> "code": "/api/status/error",
>> "messages": [
>> {
>> "code": "/api/status/error/input/invalid",
>> "info": {
>> "field": "username",
>> "value": null
>> },
>> "message": "Missing value"
>> },
>> {
>> "code": "/api/status/error/input/invalid",
>> "info": {
>> "field": "password",
>> "value": null
>> },
>> "message": "Missing value"
>> }
>> ],
>> "status": "400 Bad Request",
>> "transaction_id":
>> "cache;cache01.sandbox.sjc1:8101;2009-06-15T20:54:52Z;0002"
>>
>>
>> _______________________________________________
>> Developers mailing list
>> Developers at freebase.com
>> http://lists.freebase.com/mailman/listinfo/developers
>>
>
More information about the Developers
mailing list