observing / fullcontact

FullContact API bindings for Node.js
MIT License
42 stars 18 forks source link

Email endpoint error #32

Open bigdoods opened 7 years ago

bigdoods commented 7 years ago

Hi,

I have just tried to use the email endpoint using this package and I am getting an error of (Unexpected token < in JSON at position 0).

(See sample node code below)

var FullContact = require('fullcontact')
var fullcontact = new FullContact('<my-api-key>')

fullcontact.email.disposable('john@jenca.io', function (err, data) {
  if (err) console.log(err)
  else {
    console.log(data)
  }
})
AdriVanHoudt commented 7 years ago

Can you try the raw url and check if the response is valid json?

example https://api.fullcontact.com/v2/person.json?apiKey=YOURKEY&email=adri@test.com but then ofc with your endpoint