• suraj pawar 2
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
How to revoke a token in  salesforce.?



i have tried this,

PostMethod post = new PostMethod("https://test.salesforce.com/services/oauth2/revoke);     
post.addParameter("grant_type","refresh_token");
post.addParameter("client_id","3MVG9e2mBbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3Tv.ZkkjA_jXe36YpUEhUi3ddV");
post.addParameter("client_secret","43608xxxxxxxxx9351");
post.addParameter("refresh_token","00DN0000000OJpAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAOS92jBbid3ytwYpLkz");
post.addParameter("redirect_uri","https://www.artxxxxxxxxxxxines.com");


but this is giving me an error :  error=unsupported_token_type&error_description=this token type is not supported
i want to open a lead form through apex class using lead id...is it possible ????
i have created an app in salesforce and provided callback url, i received the code successfully but when i am requesting for token using callback url, client id and client secret key, i am getting an error i.e Invalid grant, authorization code invalid.
How to revoke a token in  salesforce.?



i have tried this,

PostMethod post = new PostMethod("https://test.salesforce.com/services/oauth2/revoke);     
post.addParameter("grant_type","refresh_token");
post.addParameter("client_id","3MVG9e2mBbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3Tv.ZkkjA_jXe36YpUEhUi3ddV");
post.addParameter("client_secret","43608xxxxxxxxx9351");
post.addParameter("refresh_token","00DN0000000OJpAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAOS92jBbid3ytwYpLkz");
post.addParameter("redirect_uri","https://www.artxxxxxxxxxxxines.com");


but this is giving me an error :  error=unsupported_token_type&error_description=this token type is not supported
i have created an app in salesforce and provided callback url, i received the code successfully but when i am requesting for token using callback url, client id and client secret key, i am getting an error i.e Invalid grant, authorization code invalid.
i have created an app in salesforce and provided callback url, i received the code successfully but when i am requesting for token using callback url, client id and client secret key, i am getting an error i.e Invalid grant, authorization code invalid.