Simplify Node.js API Docs

API Docs for:
Show:

AccessToken Class

Defined in: simplify.js:86

This class is a Simplify domain object used for OAuth transactions.

var client = Simplify.getClient({
                            publicKey: 'YOUR_PUBLIC_API_KEY',
                            privateKey: 'YOUR_PRIVATE_API_KEY'
                        });
                        
                        client.accesstoken.METHOD_NAME(params, function(error, data){
                            if(error){
                                // handle the error
                            }
                        
                            // Awesome...no error, handle the data
                        });
                        

Item Index

Methods

create

(
  • params
  • callback
)

Defined in simplify.js:109

Function to create an access token.

Parameters:

  • params Object

    A map of parameters to create an access token.

    Valid parameters include:

    • authCode : Code return from a successful OAuth authorization (REQUIRED)
    • redirectUri : URI that must match the URI saved on account (REQUIRED)
  • callback Function

    A function to handle success/error responses from the API.
    The function takes 2 parameters, the first is an error object. This is null if no error occurs. The second parameter is the response data. This is null if an error occurs.

refresh

(
  • refreshToken
  • callback
)

Defined in simplify.js:130

Function to refresh an access token.

Parameters:

  • refreshToken String

    A refresh token returned with an oauth response

  • callback Function

    A function to handle success/error responses from the API.
    The function takes 2 parameters, the first is an error object. This is null if no error occurs. The second parameter is the response data. This is null if an error occurs.

revoke

(
  • accessToken
  • callback
)

Defined in simplify.js:147

Function to revoke an access token.

Parameters:

  • accessToken String

    The access token to revoke

  • callback Function

    A function to handle success/error responses from the API.
    The function takes 2 parameters, the first is an error object. This is null if no error occurs. The second parameter is the response data. This is null if an error occurs.