Tag: moltin

客户authentication

当我发送请求到https://api.molt.in/v1/customers/authenticate我得到奇怪的回报: {"status":false,"error":"HTTP method used is not supported for this endpoint"} 我只收到这个错误,如果我添加自定义标题: 'Authorization':'Bearer ' + token_data.access_token 你可以在这里看到我的完整代码: var formData = {grant_type:'implicit', client_id: clientId} request.post({url:'https://api.molt.in/oauth/access_token',form:formData}, function (err, httpResponse, body){ if(err){ console.log(err); } token_data = JSON.parse(body); }); moltin.Authenticate(function(){ var options = {url:'https://api.molt.in/v1/customers/authenticate', form:{email:"xxxx@xxx.com", password:'xxxx'}, headers: { 'Authorization':'Bearer ' + token_data.access_token } }; function callBack(err, httpResponse, body){ if(err){ console.log(err); […]