CredentialsValidateCredentials

ValidateCredentials

Reporting API: Tells whether a siteCode / apiID / apiPassword triple would be accepted by the data operations - true or false, nothing else.

APIReporting API (credentials)
EndpointPOST https://app{server-number}.timelog.com/{account}/Service.asmx
SOAPActionhttp://www.timelog.com/ws/tlp/v4_4/ValidateCredentials
Content-Typetext/xml; charset=utf-8
AuthenticationsiteCode, apiID and apiPassword as the first three parameters. See Authentication
Changes dataNo. Safe to retry.
PagingNo: the whole result comes in one response. Narrow it with the filters.

How it works

Runs exactly the credential check every Reporting data operation runs first and returns its Boolean.

Parameters

Each parameter has one label: Required, Conditional (required depending on other values) or Optional. Send them in the order shown.

siteCodestring
Required

Your account's site code, from the Reporting API settings.

apiIDstring
Required

The Reporting API ID, from the Reporting API settings.

apiPasswordstring
Required

The Reporting API password, from the Reporting API settings.

Request

POST /{account}/Service.asmx HTTP/1.1
Host: app{server-number}.timelog.com
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.timelog.com/ws/tlp/v4_4/ValidateCredentials"

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:tlp="http://www.timelog.com/ws/tlp/v4_4">
  <soap:Body>
    <tlp:ValidateCredentials>
      <tlp:siteCode>{siteCode}</tlp:siteCode>
      <tlp:apiID>{apiID}</tlp:apiID>
      <tlp:apiPassword>{apiPassword}</tlp:apiPassword>
    </tlp:ValidateCredentials>
  </soap:Body>
</soap:Envelope>
Replace every {…} placeholder with your own value.

Response

The result is ValidateCredentialsResult: true or false. This method always answers with HTTP 200, also when the credentials are wrong.

ValidateCredentialsResultboolean
Required

Always HTTP 200.

Example response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <ValidateCredentialsResponse xmlns="http://www.timelog.com/ws/tlp/v4_4">
      <ValidateCredentialsResult>true</ValidateCredentialsResult>
    </ValidateCredentialsResponse>
  </soap:Body>
</soap:Envelope>

Example error

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <ValidateCredentialsResponse xmlns="http://www.timelog.com/ws/tlp/v4_4">
      <ValidateCredentialsResult>false</ValidateCredentialsResult>
    </ValidateCredentialsResponse>
  </soap:Body>
</soap:Envelope>
Accepted is an illustrative example. Rejected was recorded from a real call with wrong credentials.

Errors

The errors every method can return (access denied, operation failed, invalid request) are listed once in Responses and errors.

This method has no errors of its own beyond the shared ones.