December 2, 2008, Tuesday, 336

BTPWS-API-Key-Registration

From DBWiki

Jump to: navigation, search

Retrieving an API key

A web-API key must be retrieved every time your application starts. The web-API key is a temporary key that is assigned for the length of an application session. To retrieve an API key, you can perform an HTTP POST to the following URL:

http://www.sandbox.bitmunk.com:9080/api/xml/getapikey

Your GET request should contain the following URL-encoded parameters:

  • software - The name of your software.
  • softwareVersion - The version of your software making the call.

The formatted GET request should look like this:

GET /api/xml/getapikey?software=MySoftware&softwareVersion=1.2 HTTP/1.1
Host: www.sandbox.bitmunk.com:9080
User-Agent: MySoftware/1.2

The following XML will be returned to you:

<?xml version="1.0" encoding="UTF-8"?>
<xml_response version="1.0">
   <api_key version="1.0">416a</api_key>
</xml_response>