Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Initialization

Alex Vernacchia edited this page Mar 10, 2015 · 1 revision

new FuelAuth( options )

  • options
    • required: yes
    • Type: Object

Setting up the client

var FuelAuth = require( 'fuel-auth' );

// Required Settings
var myClientId     = 'yourClientId';
var myClientSecret = 'yourClientSecret';

// Minimal Initialization
var FuelAuthClient = new FuelAuth({
	clientId: myClientId // required
	, clientSecret: myClientSecret // required
});

// Initialization with extra options
var authUrl      = "https://auth.exacttargetapis.com/v1/requestToken"; //this is the default
var accessToken  = "";
var refreshToken = "";

var FuelAuthClient = new FuelAuth({
	clientId: myClientId // required
	, clientSecret: myClientSecret // required
	, authUrl: authUrl
	, accessToken: accessToken
	, refreshToken: refreshToken
});
Clone this wiki locally