Here you will find information specific to each service. You can learn how to get the necessary credentials and how to instantiate the service.

Dropbox

Implemented Interfaces

Limitations

The Dropbox API does not provide last modification timestamps for folders and this is thus not included in the metadata for folders returned by CloudRail.

Credentials

Use this link to create a new app (you may have to login first): https://www.dropbox.com/developers/apps/create

  • select 'Dropbox API', then select 'Full Dropbox'
  • give your app a name and click the 'Create app' button
  • on the page you are redirected to, you can edit the settings of the app and you'll also find your App Key (Client ID) and App Secret (Client Secret)
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Dropbox(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://api.dropboxapi.com/2"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends the "Authorization" header
  • Error checking: Checks for status 400, 401, 402 and 500

Box

Implemented Interfaces

Credentials

Use this link to create a new account: http://box.com/developer_signup

Use this link to create a new app, when you already have an account (you may have to login first): https://app.box.com/developers/services/edit/

  • give your app a name and click the 'Create Application' button
  • on the page you are redirected to, you can edit the settings of the app and you'll also find your App Key (Client ID) and App Secret (Client Secret)
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Box(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://api.box.com/2.0"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends the "Authorization" header
  • Error checking: Checks for status 400, 401, 402, 404, 503 and 509

Google Drive

Implemented Interfaces

Credentials

Use this link to create a new project (you may have to login first): https://console.developers.google.com/iam-admin/projects

  • click the 'Create Project' button and give your project a name
  • type 'drive' in the search bar, select the 'Google Drive API' and then select 'enable'
  • click on the 'Go to Credentials' button
  • you can skip the Google helper and just click on 'client ID'
  • click on the 'Configure consent screen' button and fill in the necessary text fields
  • select 'Web Client', choose a name and set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server
  • now you receive your Client ID and Client Secret

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.GoogleDrive(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

OneDrive

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://apps.dev.microsoft.com/#/appList

  • click the 'Add an app' button and give your app a name
  • on the page you are redirected to, you can edit the settings of the app and you'll also find your App Key (Client ID) and App Secret (Client Secret - 'Generate New Password')
  • click on the 'Add Platform' button and select 'Web'
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server
  • tick 'Live SDK support' under 'Advanced Options' at the bottom of the page
  • click save

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.OneDrive(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://api.onedrive.com/v1.0"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends it to the URL's query
  • Error checking: Checks for status 400, 401, 402, 404, 503 and 509
  • Requested scopes: wl.signin, wl.emails, wl.offline_access, onedrive.readwrite

OneDrive Business

Implemented Interfaces

Limitations

The OneDrive for Business API does not provide some of the information needed to completely implement the CloudStorage interface. There is no support for getting a user's login identifier, no extra metadata for images is returned and it is not possible to create a share link for folders. The rest works as specified in the interface.

Credentials

The following instructions assume that you are not familiar with Azure's Active directory configuration. If you are however, feel free to alter any of the following steps to your liking, as long as you end up with a valid Client ID, Client Secret and the ability to set a redirect URI.

  • Register a Office 365 developers site if you do not already have one. You can start a free trial at https://portal.microsoftonline.com/Signup/MainSignUp.aspx
  • Next, you need an Azure Active Directory tenant if you do not already have one. Make sure you are signed into your Office 365 tenant and go to the admin center
  • In the same browser, open https://account.windowsazure.com/SignUp to sign up for a Microsoft Azure account
  • Go to https://manage.windowsazure.com/ and navigate to 'Active Directory'
  • If you have no directory listed, switch to the 'Directory' tab, click the 'New' button on the bottom left and click 'Directory/Custom Create' to create a new directory
  • Click on your directory and go to the 'Applications' tab
  • Click the 'Add' button on the bottom and choose 'Add an application my organization is developing'
  • Choose a name, select the 'Web application and/or Web API' toggle and click continue
  • A Sign-on URL is required but not relevant here, you can take e.g. 'https://[YOUR_DOMAIN].onmicrosoft.com' if it's not taken. The same holds for the App ID URI
  • Sometimes Azure will tell you about an error and having to try again. Just wait a bit and reload the page, your just created application should be there anyway
  • Select the application and go to the 'Configure' tab
  • You can customize what your users see when your application asks for access
  • Make sure to switch 'Application is Multi-Tenant' to yes
  • Client ID is the client identifier CloudRail needs
  • You will probably want to have 'User assignment required to access app' set to no
  • Generate a new key in the 'keys' section, this is the client secret CloudRail needs
  • 'Reply URL' lists the valid redirect URIs. Set it to an endpoint on your server ready to receive redirects or localhost for testing with a local server
  • Click 'add application' to add the necessary permissions for your application
  • Select 'Office 365 SharePoint Online' and add the delegated permissions for 'Read and write user files' and 'Read user files'
  • Make sure to save by clicking on the button at the bottom

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.OneDriveBusiness(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: automatically retrieved during authentication since it is user specific
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends it to the URL's query
  • Error checking: Checks for status 400, 401, 402, 404, 503 and 509

Egnyte

Implemented Interfaces

Limitations

As of now the Egnyte REST API does not provide all of the information required for a complete implementation of all of the CloudStorage interface's methods. This is why getThumbnail, getAllocation, getUserName and getUserLogin are non-functional. We will update if this changes.

Credentials

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do. domain must be the Egnyte domain the user authorizes against.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Egnyte(
    redirectReceiver,
    "[domain]",
    "[apiKey]",
    "[sharedSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://{{domain}}.egnyte.com"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends the "Authorization" header
  • Error checking: Checks for status 400, 401, 403, 404, 409
  • Requested scopes: Egnyte.filesystem, Egnyte.link

Amazon S3

Implemented Interfaces

Credentials

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.AmazonS3(
    null,
    "[accessKeyId]",
    "[secretAccessKey]",
    "[region]"
);

Microsoft Azure

Implemented Interfaces

Credentials

  • Make sure you have a Microsoft Azure account with administrator rights and are logged in to that account
  • In the dashboard overview, go to "Storage Accounts"
  • Create a new one by clicking "Add" and fill in the required details according to your preferences
  • The name of the storage account is your "accountName"
  • Click on the account and go to "Settings/Access key" where you can find your "accessKey"

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.MicrosoftAzure(
    null,
    "[accountName]",
    "[accessKey]"
);

Rackspace

Implemented Interfaces

Credentials

  • Make sure you have a Rackspace account with administrator rights and are logged in to that account
  • In the dashboard overview, click on your user name in the top right (this is also your "userName") and click "Account Settings" in the unfolding menu
  • Under "Login Details" you can find your API Key (you may have to click "Show" next to it first)
  • The "region" parameter is the 3 character code for the region, e.g. "DFW" for Dallas

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Rackspace(
    null,
    "[userName]",
    "[apiKey]",
    "[region]"
);

Backblaze

Implemented Interfaces

Credentials

  • Make sure you have a Backblaze account with administrator rights and are logged in to that account
  • Visit https://secure.backblaze.com/b2_buckets.htm and click on "Show Account ID and Application Key"
  • In the window that pops up click "Create Application Key"
  • Now you can find your Account ID and Application Key

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Backblaze(
    null,
    "[accountId]",
    "[appKey]"
);

Slack

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://api.slack.com/apps/new

  • fill out all the fields when creating your app
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server
  • click on "App Credentials" on the left side of the menu and you'll find your Client ID and Client Secret

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Slack(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://slack.com/api"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends it to the URL's query
  • Error checking: Checks for status >400
  • Requested scopes: identity.basic, identity.team, identity.avatar and identity.email

GitHub

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://github.com/settings/applications/new

  • fill out all the fields when creating your app
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server
  • on the page you will be redirected to you will find your client ID and Client Secret. If not click on "Oauth applications" and look for your app.

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.GitHub(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://api.github.com"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends the "Authorization" header
  • Error checking: Checks for status >400, especially 401, 404 and 503

Yahoo

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://developer.yahoo.com/apps/create/

  • fill out all the fields when creating your app
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server
  • make sure you have checked the Read/Write Public and Private box in the Profiles section.
  • on the page you will be redirected to you will find your Client ID and Client Secret. If not click on "My Apps" and look for your app.

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Yahoo(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://social.yahooapis.com/v1"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends the "Authorization" header
  • Error checking: Checks for status >400, especially 401 and 503

LinkedIn

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://www.linkedin.com/developer/apps

  • click on 'create app' and fill in all the required fields
  • on the page you will be redirectet to you will find your Client ID and and Client Secret. If not go to https://www.linkedin.com/developer/apps and look for your app
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.LinkedIn(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://api.linkedin.com/v1"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends the "Authorization" header
  • Error checking: Checks for status 400, 401, 402, 404, 503 and 509
  • Requested scopes: r_basicprofile and r_emailaddress

Facebook

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://developers.facebook.com/apps/

  • click the 'Add a New App' button, choose 'basic setup' and create a new app
  • in the dashboard section you find your App Key (Client ID) and App Secret (Client Secret)
  • go to 'Add Product' and select 'Facebook Login'
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Facebook(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://graph.facebook.com"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends the "Authorization" header
  • Error checking: Checks for status >400
  • Requested scopes: public_profile, email, user_birthday, user_about_me, publish_actions, user_friends, user_photos

FacebookPage

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://developers.facebook.com/apps/

  • click the 'Add a New App' button, choose 'basic setup' and create a new app
  • in the dashboard section you find your App Key (Client ID) and App Secret (Client Secret)
  • go to 'Add Product' and select 'Facebook Login'
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.FacebookPage(
    redirectReceiver,
    "[pageId]",
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Google Plus

Implemented Interfaces

Credentials

Use this link to create a new project (you may have to login first): https://console.developers.google.com/iam-admin/projects

  • click the 'Create Project' button and give your project a name
  • type 'plus' in the search bar, select the 'Google+ API' and then select 'enable'
  • click on the 'Go to Credentials' button
  • you can skip the Google helper and just click on 'client ID'
  • click on the 'Configure consent screen' button and fill in the necessary text fields
  • select 'Web Client', choose a name and set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server
  • now you receive your Client ID and Client Secret

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.GooglePlus(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

Twitter

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://apps.twitter.com/

  • click the 'Create New App' button and fill in the required details
  • click on 'Keys and Access Tokens' and you'll find your App Key (Client ID) and App Secret (Client Secret)

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Twitter(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]"
);

Advanced Request

  • Prepended Base URL: "https://api.twitter.com/1.1"
  • Authentication: Makes sure a valid OAuth Token and OAuth Token Secret are present (else performs the OAuth1.0 flow) and creates a signature from the request that is appended as the "Authorization" header
  • Error checking: Checks for status >400

Windows Live

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://apps.dev.microsoft.com/#/appList

  • click the 'Add an app' button and give your app a name
  • on the page you are redirected to, you can edit the settings of the app and you'll also find your App Key (Client ID) and App Secret (Client Secret)
  • click on the 'Add Platform' button and select 'Web'
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.MicrosoftLive(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://apis.live.net/v5.0"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends it to the URL's query
  • Error checking: Checks for status >400, especially 401 and 503
  • Requested scopes: wl.emails, wl.birthday

Heroku

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://dashboard.heroku.com/account/applications#api_clients

  • click the 'Register New API Client' button and give your app a name
  • set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server
  • now you can find your (client) ID and (client) secret

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Heroku(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://api.heroku.com"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends the "Authorization" header
  • Error checking: Checks for status >400, especially 401, 404 and 503
  • Requested scopes: identity

Twilio

Implemented Interfaces

Credentials

Create a Twilio account if you haven't already and find ACCOUNT SID and AUTH TOKEN here: https://www.twilio.com/console

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Twilio(
    null,
    "[accountSid]",
    "[authToken]"
);

Nexmo

Implemented Interfaces

Credentials

Create a Nexmo account if you haven't already and find API KEY and API SECRET here: https://dashboard.nexmo.com/private/dashboard

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Nexmo(
    null,
    "[apiKey]",
    "[apiSecret]"
);

Mailjet

Implemented Interfaces

Credentials

Create a Mailjet account if you haven't already and find API KEY and API PRIVATE KEY here: https://eu.mailjet.com/account/api_keys

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.MailJet(
    null,
    "[apiKey]",
    "[apiPrivateKey]"
);

SendGrid

Implemented Interfaces

Credentials

Create a SendGrid account if you haven't already and generate an API key from the Dashboard under Settings/API Keys. Select "General Key", choose any name and make sure that at least the permission "Mail Send" is fully enabled.

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.SendGrid(
    null,
    "[apiKey]"
);

PayPal

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://developer.paypal.com/developer/applications/

  • Scroll to section 'REST API apps' and press 'Create App'
  • Put your app name and select the standard sandbox developer account
  • In the next screen you will find your ClientID and Client Secret which you will need to provide to our SDK

Important: If you want to work with subscriptions, additional configuration is required:

  • Go to https://developer.paypal.com/developer/accounts
  • Select your business account and press 'Profile'
  • In the next screen press 'Upgrade to Pro'
  • This should enable all the necessary features needed. However, according to PayPal, in some cases this does not work. So if you get 'DPRP is not enabled' when trying to create a subscription, you have to ask the PayPal Tech Support to enable it for you (https://www.paypal-techsupport.com/app/ask).

Instantiation

The sandbox parameter is a boolean value. If set to true PayPal's Sandbox API is used which allows you to use your Sandbox credentials and test if everything is working alright. For production set it to false to use the real API and use your Live credentials.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.PayPal(
    null,
    "[sandbox?]",
    "[clientID]",
    "[clientSecret]"
);

Stripe

Implemented Interfaces

Credentials

Use this link to see your credentials (you may have to login first): https://dashboard.stripe.com/account/apikeys

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Stripe(
    null,
    "[secretKey]"
);

Google Places

Implemented Interfaces

Credentials

Use this link to create a new project (you may have to login first): https://console.developers.google.com/iam-admin/projects

  • Create a new project if you don't have one already
  • Search for the 'Google Places API Web Service' through the search bar on top
  • Enable the API for your project
  • Go to your credentials page and create a new API server key
  • This key needs to be used with the CloudRail SDK

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.GooglePlaces(
    null,
    "[apiKey]"
);

Foursquare

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://foursquare.com/developers/apps

  • Select 'Create New APP'
  • Put in a name and a welcome url for your APP and continue
  • Next screen contains your client identifier and client secret

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Foursquare(
    null,
    "[clientIdentifier]",
    "[clientSecret]"
);

Yelp

Implemented Interfaces

Credentials

Use this link to see your credentials (you may have to login first): https://www.yelp.com/developers/manage_api_keys

Instantiation

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Yelp(
    null,
    "[consumerKey]",
    "[consumerSecret]",
    "[token]",
    "[tokenSecret]"
);

Instagram

Implemented Interfaces

Credentials

Use this link to create a new app (you may have to login first): https://www.instagram.com/developer/clients/manage/

  • Press the 'Register a New Client' button.
  • Fill out the form with your data. Set the Redirect URI to an endpoint on your server ready to receive redirects or localhost for testing with a local server.
  • Press "Register" when you are done.
  • You should find your credentials on the next page.

Instantiation

See How to implement a Redirect Receiver to learn about the redirectReceiver parameter.

The state parameter should be a random token that can be used for additional verification in the redirectReceiver. Its use is optional thus any string will do.

const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail license key]");

let service = new cloudrail.services.Instagram(
    redirectReceiver,
    "[clientIdentifier]",
    "[clientSecret]",
    "[redirectUri]",
    "[state]"
);

Advanced Request

  • Prepended Base URL: "https://api.instagram.com/v1"
  • Authentication: Makes sure a valid access token is present (else performs the OAuth2.0 flow) and appends it to the URL's query
  • Error checking: Checks for status >400