Authentication
To use the authentication service, you need the authentication token from the login service or the refresh token from this service.
The authentication service supplies two types of tokens per request: an access token and a refresh token. The access token is required to grant access to the specified service you would like to use. This access token has a set expiration date, after which you have to reauthenticate through this service with either a new authentication token from the login service or the refresh token supplied by this service before.
Request
REST
URL: https://iqservice.stockbase-connect.com/authenticate/
Headers
Authentication: AuthenticationToken / RefreshToken (GUID)
Library
Function: Authenticate
Parameters
Token: AuthenticationToken / RefreshToken (GUID)
SOAP 1.1
Headers
Content-Type: text/xml
Text
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Authenticate xmlns="https://iqservice.divide.nl/">
<token>guid</token>
</Authenticate>
</soap:Body>
</soap:Envelope>
SOAP 1.2
Headers
Content-Type: application/soap+xml
Text
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<Authenticate xmlns="https://iqservice.divide.nl/">
<token>guid</token>
</Authenticate>
</soap12:Body>
</soap12:Envelope>
Response
Success
@AuthenticationResponse {
Answer: Status code of the request,
Access token: [token],
Expiration date: [date],
Token type: [type],
Refresh token: [token]
}
REST
Headers
Response Status: 200
Content-Type: text/html
Text
<?xml version="1.0" encoding="utf-16"?>
<nl.divide.iq xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<access_token>0731076a-f745-4bb9-bbd5-1258548e4442</access_token>
<expiration_date>2014-06-15T15:34:03.5129253+02:00</expiration_date>
<token_type>Access</token_type>
<refresh_token>a30e1e68-a022-415a-9d22-e19aff090b19</refresh_token>
</nl.divide.iq>
SOAP 1.1
Headers
Response Status: 200
Content-Type: text/xml
Text
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AuthenticateResponse xmlns="https://iqservice.divide.nl/">
<AuthenticateResult>string</AuthenticateResult>
</AuthenticateResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
Headers
Response Status: 200
Content-Type: text/xml
Text
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AuthenticateResponse xmlns="https://iqservice.divide.nl/">
<AuthenticateResult>string</AuthenticateResult>
</AuthenticateResponse>
</soap12:Body>
</soap12:Envelope>
TokenEmpty
Headers
Response Status: 200
Content-Type: text/xml | application/json
Text
<?xml version="1.0" encoding="utf-8"?>
<nl.divide.iq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<answer>TokenEmpty</answer>
</nl.divide.iq>
REST
Headers
Response Status: 200
Content-Type: text/html
Text
<?xml version="1.0" encoding="utf-16"?>
<nl.divide.iq xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<access_token>0731076a-f745-4bb9-bbd5-1258548e4442</access_token>
<expiration_date>2014-06-15T15:34:03.5129253+02:00</expiration_date>
<token_type>Access</token_type>
<refresh_token>a30e1e68-a022-415a-9d22-e19aff090b19</refresh_token>
</nl.divide.iq>