Skip to content

Instantly share code, notes, and snippets.

@dmahlow
Last active December 25, 2015 20:49
Show Gist options
  • Save dmahlow/7038140 to your computer and use it in GitHub Desktop.
Save dmahlow/7038140 to your computer and use it in GitHub Desktop.
oauth_access_token = <OAUTH ACCESS TOKEN>
oauth_access_token_secret = <OAUTH ACCESS TOKEN SECRET>
consumer = OAuth::Consumer.new('consumer_key','consumer_secret',
site: '<magento host>',
request_token_path: '/oauth/initiate',
access_token_path: '/oauth/token',
authorize_path: '/admin/oauth_authorize',
signature_method: 'PLAINTEXT'
)
access_token = OAuth::AccessToken.new(consumer, oauth_access_token, oauth_access_token_secret)
access_token.get('/api/rest/orders')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment