User Tools

Site Tools


api:ping

API : ping

Introduction

This request is used for:

  • Checking if a client is logged on / still authenticated
  • Keeping the token alive

Each time an API call against a protected URI is performed, the timeout for the token used is reset and thus kept alive.

If the token is not valid anymore or no token is provided, then an error response will be given, and therefore the ping request can be used to check if a user needs to authenticate.

Request

URL https://api.telecomx.dk/ping
Method GET
Query No arguments

Response

JSON object
success true if authenticated and timeout has been reset

Example

{
  success: true
}

Errors

Error code Message Description
401 expired Session has expired, please login
401 credentials_invalid Authorization required, please login
401 format_error Authorization header format is Authorization: Bearer <token>
401 invalid_token Undecipherable
401 invalid_token IP address not authenticated
401 invalid_token Please login
api/ping.txt · Last modified: 2014/06/09 10:21 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki