Remove Identification Session Table of contents Endpoint URL parameter description Request body parameter description Response body parameter description Successful response Failed response Sample request Sample response Sample success response Sample failed response Implementation CURL Using php-client This API destroys the session initialed by authentication or signing processes via smart id.
Endpoint Path (Locale: LT) /api/smartid/session/{sessionId} Path (Locale: EN) /en/api/smartid/session/{sessionId} Method DELETE Request Body Schema application/json
URL parameter description Request body parameter description Key Requirement Type Description access_token Mandatory String API Access Token
Response body parameter description Successful response Key Type Description status String Status of the request, ok
in this case
Failed response Key Type Description status String Status of the request, error
in this case message String Brief message about what is wrong
Sample request
DELETE /en/api/smartid/session/1c5cd62c-bbf7-779e-3fb4-bad3433ad83f HTTP/1.1
Host: app.marksign.local
Content-Type: application/json
{
"access_token": "52900c96-3f60-5307-3719-5948f0191da6"
}
Sample response Sample success response Sample failed response
{
"status": "error",
"message": "Request number is invalid"
}
Implementation CURL
curl --location --request DELETE 'https://app.marksign.local/en/api/smartid/session/1c5cd62c-bbf7-779e-3fb4-bad3433ad83f' \
--header 'Content-Type: application/json' \
--data-raw '{
"access_token": "52900c96-3f60-5307-3719-5948f0191da6"
}'
Using php-client To use the php-client, please follow the installation and basic usage here , and use AppBundle\GatewaySDKPhp\RequestBuilder\SmartidIdentificationRemoveRequestBuilder
as request builder.
/**
* The sessionId is the value of 'token' found either
* from the response of 'initialize authentication via smart id' request
* or from the response of 'initialize hash signing authentication via smart id' request
* The following is a dummy to use as example.
*/
$sessionId = '1c5cd62c-bbf7-779e-3fb4-bad3433ad83f';
$indentRemReq = (new SmartidIdentificationRemoveRequestBuilder)
->withSessionId($sessionId)
->createRequest();
$indentRemRes = $client->postRequest($indentRemReq);
$indentRemResArray = $indentRemRes->toArray();
var_dump($indentRemResArray);