versolearning / meteor-intercom

Reactive intercom integration for Meteor
47 stars 15 forks source link

TypeError: Cannot read property 'events' of undefined #21

Closed DaveAdams88 closed 8 years ago

DaveAdams88 commented 8 years ago

Hey there,

I'm having a problem with the server side events:

TypeError: Cannot read property 'events' of undefined

I've added all the intercom settings: intercom.secret, public.intercom.id and public.intercom.apikey

and I'm using the example provided in a server method:

IntercomClient.events.create({ event_name: 'Test event', created_at: Math.floor(new Date().getTime()/1000), user_id: Meteor.userId() }, function (d) { console.log(d); });

is there a step I am missing?

Apart from this it is working great

Thanks, Dave

shelkie commented 8 years ago

Hi, an error in the docs here. Should be Meteor.settings.intercom.apikey not Meteor.settings.public.intercom.apikey

I'll submit a PR to update this. Thanks for pointing it out, Eric.

DaveAdams88 commented 8 years ago

Awesome! works perfectly now, thanks! :)

zol commented 8 years ago

Thanks guys, gj.