I have a node.js program that I am trying to work with googleapis module ( https://github.com/google/google-api-nodejs-client ) version 0.2.5 alpha.
I can make calls using raw HTTP without any problems, so I know that I am white specified for the API, I authenticate and authorize correctly, and correct areas are corrected and thatβs it. If I use the same access_token to insert into the timeline, I get an error in the callback. I also open the plus API, and calls using this API work fine.
code snippet for detecting an API that works without problems:
var client; googleapis .discover( 'plus', 'v1' ) .discover( 'mirror', 'v1' ) .execute( function(err,data){ console.log( err ); client = data; });
The code fragment to call:
client.mirror.timeline.insert ({
text: "test 1"
}) .withAuthClient (user.auth) .execute (function (err, result, res) {
console.log ('++ start ++');
console.log ('+ err', err);
console.log ('+ result', result);
//console.log ('+ res', res);
console.log ('++ end ++');
});
What is recorded during the callback:
++ start ++
+ err {code: 400,
message: 'Required',
data: [{domain: 'global', reason: 'required', message: 'Required'}]}
+ result undefined
++ end ++
Any indication of what is required, how to provide it, or how to further debug such errors?