google-api-nodejs-client icon indicating copy to clipboard operation
google-api-nodejs-client copied to clipboard

gmail get a thread ... get not defined

Open djholly123 opened this issue 12 years ago • 2 comments

Hi I'm trying to get a Thread from gmail but getting an error

TypeError: Cannot call method 'get' of undefined

   var gmail = google.gmail({ version: 'v1', auth: oauth2Client });

    gmail.users.messages.threads.get({
        id: "148a32fa2606e57b",
        userId: "me"
    }, function(err, results){
        if(err){
            console.log(err)
            return
        };
        console.log(results);
    });

I am able to do a send with gmail.users.messages.send( ... args, callback) would expect same style of code to work for other calls ... Are there any good examples of getting a message / message thread when you have the id ?

djholly123 avatar Sep 23 '14 19:09 djholly123

Take a look at gmail.users.threads.get() and let me know if that's what you need.

ryanseys avatar Sep 23 '14 20:09 ryanseys

Hi Ryan Yes that was my problem ... its working now thanks ... doh!

djholly123 avatar Sep 24 '14 08:09 djholly123