invalid code during oauth

invalid code during oauth

Hi,

I'm using CRM API 1.0 and now I'm trying to upgrade to 2.0.  My application is for a single user, and it is creating/updating contacts and leads based on events in the PHP server.

I created a zoho client application and  got client ID and client secret. Then I clicked on "self client" and got grand token.

Now I try to get thew refresh token and I failed. I tried sending post:
https://accounts.zoho.com/oauth/v2/token?code={grant_token}&redirect_uri={redirect_uri}&client_id={client_id}&client_secret={client_secret}&grant_type=authorization_code

or Using the PHP SDK:

ZCRMRestClient::initialize();
$grantToken = "1000.60808b5f0383e781fd0f64bd8e9dd3b3.c7fbcaec92f016adbaac22a2872a5efa";
$oAuthClient = ZohoOAuth::getClientInstance();   
$oAuthTokens = $oAuthClient->generateAccessToken($grantToken);

In both cases I got "invalid_code".

Can you help please?