Java API Kit v3 - Setup

How to setup the API v3 Java API kit with Tomcat

Step 1) Signup to Handset Detection and create a website profile.

- From your dashboard scroll down to 'Manage Sites' and click 'Add Site'.
- Once you've added a site click 'Site Settings' (in Actions, the cogs icon) to get the Site Settings page.
- From the Settings page, select the 'Cloud' tab and copy the details. You'll need these to configure your API kit in step 2.

 

 

Step 2) Download the Java API  kit and configure it up.

- Download the API kit from GitHub : https://github.com/HandsetDetection/java-apikit

- Stop Tomcat.

- Copy the WebServiceHD3Test/WebContent directory to {TOMCAT_ROOT}/webapps/{app name} - app name can be anything you like.

- Copy the config template file from hdapi_config.properties to {TOMCAT_ROOT}/webapps/WebContent/WEB-INF/hdapi_config.properties 

- Edit the {TOMCAT_ROOT}/webapps/WebContent/WEB-INF/hdapi_config.properties and add your username, secret and site_id. It will look something like this

common.username=richards-api-username

common.secret = richards-api-secret

common.site_id = 22

- Start Tomcat

- Browse to http://localhost:8080/{app name} and run the tests.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk