-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single user access to analytics API #13
Comments
I do have a local branch to do this. I'm a bit busy this week, but I'll try to get that up and integrated soon! |
Awesome, thanks! 🍺 |
Can you check out this branch: https://github.com/tpitale/legato/tree/oauth-1-support It allows you to use oauth with an API key, and hang onto that token forever without having to refresh it. This was how I did single user support in my own stuff. Check out the Rakefile for a way to get a new token. I'm not sure if this is entirely what you're looking for, and it certainly needs better integration, tests, and documentation. But it might get you started. |
I was able to get an oauth verification code using your code from Rakefile. Do I use that to create a Legato::User? |
I think I figured it out. After manually retrieving the Token/Secret, I just create an access token in with those saved values:
Thanks for your help. |
Filtering on this branch must not match the docs right? Does this use the previous method of filtering from Garb? |
Nvm, just saw that oauth-1-support is up-to-date with master. I'll keep messing with it. |
Got this working. Thanks! |
Trying to get this working too....do you have any tips? I can only get it working if I continue to re-authorize my account and get a current token. I just want to use the api key. How can I do this? thanks! |
I'm trying to set up this type of access too, any tips? |
As far as I'm aware, Google has disabled access via oauth 1. OAuth 2 is the only thing available. You can, however, get a service account: https://github.com/tpitale/legato/wiki/OAuth2-and-Google#service-accounts |
FYI: Service accounts only work for Google Apps accounts. Since we were using a regular |
Cool, if you open an issue I'll add it to the wiki so people can find it. Thanks!
|
@tpitale Will do, thanks! |
I've read the docs on Getting an OAuth2 Token but that only seems appropriate when your app needs to authenticate for the current user. In my case I just need to access my own analytics.
Twitter describes this: https://dev.twitter.com/docs/auth/oauth/single-user-with-examples
Is there a way to do this with legato, or else use Google's Simple API Access with an API key?
The text was updated successfully, but these errors were encountered: