Express Entry:Token Server

From Melissa Data Wiki
Revision as of 16:34, 14 March 2018 by Admin (talk | contribs)
Jump to navigation Jump to search

← Global Express Entry

Express Entry Navigation
Introduction
Global Getting Started
Endpoints
ExpressAddress
ExpressCityState
ExpressFreeForm
ExpressPostalCode
ExpressStreet
GlobalExpressAddress
GlobalExpressCountry
GlobalExpressLocalityAdministrativeArea
GlobalExpressFreeForm
  ↳  Filtering Responses
GlobalExpressPostalCode
GlobalExpressThoroughfare
Examples
XML Response
JSON Response
Global XML Response
Global JSON Response
Token Server
Result Codes
Result Code Use
Express Entry Result Codes
Sample Code



Using the Token Server

Express Entry supports the use of authentication tokens to access the service. The token server is most often used when your license string must be concealed, such as in a web page using Express Entry that is facing the public.

Tokens are more secure when compared to the other methods of passing sensitive information in plain text over a network, where it could be observed by a third party. PHP code and a JavaScript script which calls the PHP are provided to demonstrate how to implement tokens in a web page.

In order to implement the PHP and JavaScript sample:

  • The server must have PHP enabled.
  • The sample PHP must be loaded on the server and your License Key must be entered where marked in the code.
  • The JavaScript sample must be pasted into your webpage and edited with your IP information.
  • Both the PHP sample and the calling Javascript must be on the same domain.

Note that the page where the JavaScript resides must be in the same domain as the file containing the PHP token-handling code. This is due to ‘same origin policy’ of AJAX. If Express Entry does not respond with addresses after inserting/adding the Javascript and PHP code, make sure that the JavaScript is called from the same domain as the server hosting the PHP, and that the token variable is being used instead of your ident or License Key.

The code is commented where the necessary changes (such as adding the License Key) are to be made.

REST

You may also make a REST request to the token server. The service URL is:

https://token.melissadata.net/v3/web/Service.svc/RequestToken?

The available REST request parameters are:

L=[LICENSE KEY]
&P=[PACKAGE]
&IP=[IP ADDRESS]

A sample REST request would be:

http://token.melissadata.net/v3/web/Service.svc/RequestToken?L=[LICENSE Key]&p=pkgExpressEntry&IP=[IP ADDRESS]

This returns a token starting with ‘T:’. The IP Addres is optional added security. If you send your IP Address, we can detect unauthorized use of your tokens and take preventative measures.


A sample REST response would be:

<RequestTokenResponse>
    <result> TE01 </result>
    <token> T:GpI77FjJ6X3BVNfCyRg9Jx==lZ0reyIynu03oFgO050sP5== </token>
</RequestTokenResponse>