Authentication API

From DocuWiki
Revision as of 14:39, 25 February 2014 by 0oqb9d (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Most tasks with the API require authentication against the security system before. This authentication is done in two steps, Identifying and Authenticating.


247 Platform API Authentication Cycle

API Authentication Cycle.png


Identify

Request URL

http://console.247platform.com/api/identify/get/[client id]

Response

{
  "response":{
     "salt":"560b4j4b",
     "code":"200",
     "isOk":true
  },
  "code":"200"
}

Errors

  1. 400 MissingRequiredQueryParameter, A parameter is missing from the request

Authenticate

Request URL

http://console.247platform.com/api/authenticate/get/[client id]?salt=[salt]&code=[authentication code]

Params

  1. `salt` (required), String, The salt value provided in the Identify request
  2. `code` (required), String, The result of an MD5 of your API key and the salt, without spaces between, e.g.
  3. $code = md5($apiKey.$salt);

Response

{
  "response":{
     "response":"ok",
     "sessionId":"0ce433ffcca7e3410ds4ssa3317d44c19"
  },
  "code":"200"
}

Errors

  1. 400 MissingRequiredQueryParameter, A parameter is missing from the request
  2. 400 AuthenticationFailed, Authentication has failed with the provided information