Skip to content

Data api authentication revokeauthentication

Yuji Takayama edited this page Jul 10, 2013 · 1 revision

Authentication: revokeAuthentication

Invalidate current session. This is like logout. All access tokens related to that session are invalidated too.

Authorization is required. but if there is an effective session, user can revoke by the following methods.

In the case of a web browser, can be authorized by httponly-cookie.

In the case of other than a browser, can be authorized by sending a sessionId that is retrieved via authentication endpoints in MTAuth request header.

MTAuth sessionId={retrieved sessionId}

Request

HTTP Request

This method accepts DELETE and POST with __method=DELETE.

DELETE https://your-host/your-mt-api.cgi/v1/authentication

Parameters

Method Parameters

Not available.

Query Parameters

Not available.

Request Body

Parameter Type Description
clientId string This is not required if you have an access token. You can revoke authentication if you have a session id related to this clientId, although you do not have an access token.

Response

Parameter Type Description
status string The value of this parameter is always "success".

Status Code

Code Description
200 no error

Example

DELETE /mt-api.cgi/v1/authentication
Host: www.example.com
X-MT-Authorization: MTAuth=xxxxxxxxxxxxxxxxxxxxxxxx

HTTP/1.0 200 OK
Content-Type: application/json
Content-length: ...
Clone this wiki locally