Created
October 20, 2016 14:30
-
-
Save jlaustill/8c18a05b414b4851a794a796d1212c19 to your computer and use it in GitHub Desktop.
The 3rd and final step in getting a permanent token from Magento REST API 1.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var consumerKey = "57d84828608840c7dbaa637f2f66ee13", | |
consumerSecret = "82fbea317ff08682cdd73d9eb242f0c7", | |
token= "ce50bf275b8face27b9f6c43c91f9058", | |
token_secret="13a59b2e7547b239d116b62b35142528", | |
verifier="399860495fab9eea64b69375fd5c5aca", | |
siteUrl = "http://dev.yoursite.com"; | |
// step 3 | |
var qs = require('querystring'), | |
oauth = { | |
callback: 'http://mysite.com/callback/' | |
, consumer_key: consumerKey | |
, consumer_secret: consumerSecret | |
, token: token | |
, token_secret: token_secret | |
, verifier: verifier | |
} | |
, url = siteUrl + '/oauth/token'; | |
request.post({url:url, oauth:oauth}, function (err, req, body) { | |
console.log(body); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment