Skip to content
Node.js SDK for FullContact Contacts API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Updated scope requires in jsdocs Mar 13, 2018
test
.gitignore Added in support for user-agent and custom api url. Aug 21, 2017
.istanbul.yml Added in istanbul config to generate cobertura report. Feb 15, 2017
.travis.yml Added in slack notifications Dec 12, 2017
LICENSE Added in License Dec 12, 2017
README.md Updated README Dec 12, 2017
docs.md Updated dependencies. Jan 15, 2019
package-lock.json Updated dev depenencies Jan 15, 2019
package.json Bumped version Jan 15, 2019

README.md

Build Status npm version Node version

IMPORTANT: This SDK should be used server-side only. Using it in a browser would expose Client Secret or API Key.

Installation

npm install contacts-api-node --save

Documentation

API Documentation can be found at https://www.fullcontact.com/apps/docs

JSDocs can be found in docs.md

Usage

Configuration

var fullcontact = require('contacts-api-node')({
	apiKey: '<API Key>', //for v2 APIs. See: https://www.fullcontact.com/developer/
	clientId: '<Client ID>', //for v3 APIs. See: https://app.fullcontact.com/apps
	clientSecret: '<Client Secret>',
	redirectUri: '<Redirect URI>',
	scope: 'list,of,scopes',
	userAgent: '<AppName/Version>',
	baseUrl: '<URL>' //to override base api url
});
OAuth

All OAuth methods can be found under the oauth property on the client.

Supported Methods:
  • getAuthorizationUrl()
  • exchangeAuthCode(code)
  • exchangeRefreshToken(refresh_token)
var url = fullcontact.oauth.getAuthorizationUrl();
v2 APIs

All v2 APIs can be found under the v2 property on the client.

fullcontact.v2.person.lookup({
	email: 'john@doe.com'
})
	.then(res => {
		//2xx response
	})
	.catch(res => {
		//non-2xx response
	});
Contacts APIs

All Contacts APIs can be found under the contacts property on the client.

fullcontact.contacts.account.get(accessToken)
	.then(res => {
		//2xx response
	})
	.catch(res => {
		//non-2xx response
	});

Tests


To run tests:

npm test

To get coverage report:

npm run coverage

You can’t perform that action at this time.