Question

I'm trying to follow this guide to play around with Google Predict from the commandline: http://thoughts.inphina.com/2010/10/17/getting-started-with-google-prediction-api-machine-learning-on-cloud/ Unfortunately I'm not able to get past the authentification with the following commands:

1) Will return SID, LSID, Auth tokens - the last one will be used in 2)

curl -X POST \
  -d accountType=HOSTED_OR_GOOGLE \
  -d Email=<mail> \
  --data-urlencode Passwd=<password> \
  -d service=xapi \
  -d source=account \
  -H "Content-Type:application/x-www-form-urlencoded" \
  https://www.google.com/accounts/ClientLogin

2) Trying to trigger the training, will result in a 401 response for me.

curl -X POST \
    -H "Content-Type:application/json" \
    -H "Authorization: GoogleLogin auth=<auth-token>" \
    -d "{\"data\":{}}" \
    https://www.googleapis.com/prediction/v1.5/training?data=<bucket>%2F<file>

Any suggestions?

Cheers.

Was it helpful?

Solution

turned out to be easier to work with OACurl which is also documented a bit better here.

Cheers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top