Title / Description
Code OAUTH2_SITE = 'https://foo' RESOURCE_OWNER_USERNAME = 'user@example.com' RESOURCE_OWNER_PASSWORD = 'password' client = OAuth2::Client.new(CLIENT_ID, CLIENT_SECRET, site: OAUTH2_SITE) token = client.password.get_token(EMAIL, PASSWORD) response = token.get(api_url) puts JSON.pretty_generate(JSON.parse(response.body))
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code