function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
suraj pawar 2suraj pawar 2 

Revoking/ Refreshing Token

How to revoke a token in  salesforce.?

i have tried this,

PostMethod post = new PostMethod(";     

but this is giving me an error :  error=unsupported_token_type&error_description=this token type is not supported
Hi , 

Revoking OAuth Tokens
When a user logs out of an app, or the app times out or in other ways becomes invalid, the logged-in users’ credentials are
cleared from the mobile app. This effectively ends the connection to the server. Also, Mobile SDK revokes the refresh token
from the server as part of logout.
Revoking Tokens
To revoke OAuth 2.0 tokens, use the revocation endpoint:
Construct a POST request that includes the following parameters using the application/x-www-form-urlencoded
format in the HTTP request entity-body. For example:
POST /revoke HTTP/1.1
Content-Type: application/x-www-form-urlencoded
If an access token is included, we invalidate it and revoke the token. If a refresh token is included, we revoke it as well as any
associated access tokens.
The authorization server indicates successful processing of the request by returning an HTTP status code 200. For all error
conditions, a status code 400 is used along with one of the following error responses.
• unsupported_token_type—token type not supported
• invalid_token—the token was invalid
For Sandbox, use instead of

See pg # 132,