"Missing Access Token" in google-api gem
I'm trying to use the command like google-api gem with the prediction API. I think I've been doing this exactly as I've been reading, but it keeps giving me the error "Missing Access Token".
First I authenticate via 开发者_JAVA技巧oauth1. It brings me to the log in page where I log in and grant access. After I log in, it closes and there is a file created in ~/.google-api.yaml
with a token_credential_secret
and token_credential_key
.
google-api oauth-1-login --scope https://www.googleapis.com/auth/prediction
I should be authenticated now aren't I? When I try to execute a command, it get Missing Access Token
.
google-api execute prediction.training.insert "data=bucket/train.csv"
I've been scouring the internet for this answer, but without much luck. It also doesn't help that google's docs usually aren't up to date.
I removed the docs that were out-of-date. Let me know if you see anything else that's out-of-date. Main issue is simply that I've been the person building the Ruby client and now I'm moving to Kenya, and the people who are taking it over are still ramping up. Please bear with us.
Do this instead:
bin/google-api oauth-2-login \
--scope=https://www.googleapis.com/auth/prediction \
--client-id=<your-client-id> \
--client-secret=<your-client-secret>
Then you can make your API calls:
google-api execute prediction.training.insert -- data=bucket/train.csv
精彩评论