Unable to access Configuration Data
I am triyng to access the configuration details (spaceId, userid, etc) throught the configurationToken, but I got an authentication error:
{ timestamp: 1530782409197,
status: 401,
error: 'Unauthorized',
message: 'No message available',
path: '/api/v1/apps/dcf36877-4eeb-4877-a12e-43dc8a435a8f/configurationData/fe41f6ce-c7f9-4e91-b120-bdc8694a62c7' }
The code I am using is below:
var Client = require('node-rest-client').Client;
var client = new Client();
let APPID="dcf36877-4eeb-4877-a12e-43dc8a435a8f" ;
// direct way
// GET v1/apps/<appId>/configurationData/<configurationToken>
let path = "/v1/apps/"+APPID+"/configurationData/"+configurationToken
client.get(host+path, function (data, response) {
// parsed response body as js object
console.log(data);
// raw response
// console.log(response);
});
I have already the APP authenticated as an User (using OAUTH)..... is there anything else I should do ?
請登入寫評論。
評論
1 條評論