Revoke Refresh Token

Revoke a user’s refresh token.

Request Format

POST https://{apigw-address}/app-portal-service/v2.0/refreshToken/revokeAll

Request Parameters (Header)

Name

Mandatory/Optional

Data Type

Description

Authorization

Mandatory

String

The access token (or bearer token). Refer to Log In or Refresh Access Token to learn how to get the access token.

Content-Type

Optional

String

The content type of the returned content is “application/x-www-form-urlencoded”.

Request Parameters (Body)

Name

Mandatory/Optional

Data Type

Description

refreshToken

Mandatory

String

The refresh token. Refer to Choose Organization to learn how to get the refresh token.

Samples

Request Sample

url: https://{apigw-address}/app-portal-service/v2.0/refreshToken/revokeAll
method: POST
requestHeaders:
{
  "Authorization":"yourBearerToken"
}
requestBody:
{
  "refreshToken":"yourRefreshToken"
}

Return Sample

{
  "code":200,
  "message":"",
  "data":null
}

Java SDK Sample

public class AppPortalSdkTest{
    @Test
    public void revokeRefreshTokenTest() {
        RevokeRefreshTokenRequest revokeRefreshTokenRequest = new RevokeRefreshTokenRequest("your_access_token", refreshToken);
        RevokeRefreshTokenResponse response = Poseidon.config(PConfig.init().appKey("your_access_key").appSecret("your_secret_key").debug())
                .url("https://{apigw-address}").getResponse(revokeRefreshTokenRequest, RevokeRefreshTokenResponse.class);

        System.out.println("Revoke RefreshToken res: " + JSON.toJSONString(response));

        assertEquals(200, response.code);
    }
}