1. Home
  2. Docs
  3. API
  4. Introduction
  5. Authentication


To work with the API you need to be authenticated by DWService. Register an DWService account at https://api.dwservice.net/signup.html, After that login with your account https://api.dwservice.net/login.html and go to My Account/Account, in “API Key” Section click “Generate New Key” button, set a key name and click “Create” button. Finally you get an API Key and Secret.

You can authenticate in two way:

1 – Basic HTTP authentication (Not Raccomended)
You have to add the “Authorization” header to the request.

Authorization: Basic base64(<key>:<secret>)

2 – HMAC Signature (Raccomended)
You have to add the “X-DW-Authorization” header to the request.

X-DW-Authorization: HM1 <key>:base64(hashHMAC(<curtime>,<secret>)):<curtime>

The HMAC hashing algorithm must be sha1, curtime is the current time expressed in milliseconds have passed since January 1, 1970, 00:00:00 GMT and it has an expire period of 10 minutes.