How to get access and referesh token without code

Hello Team,
I m trying to get access token by using below details but i m getting this error:
{
“success”: false,
“message”: "Invalid parameter: client_secret",
“error”: “invalid_request”
}

Url: https://oauth.pipedrive.com/oauth/token
method: post
—header----
Content-Type:application/x-www-form-urlencoded
—body-----
client_id:2db77ade856cb6c5
client_secret:c665f16216fa563a1584d4e622c957c665a534e8↵
grant_type:authorization_code
redirect_uri:https://staging.gfah.events/

Kindly help me how can i get token by api, i m trying this via postman.

Hi @Rohit_Bharti

It’s not possible to get access and refresh tokens without code. Please check this page for more details OAuth authorization.

Also, client_secret is a secret value and should not be shared publicly. To be safe, please regenerate yours in Marketplace manager.

thanks for response.
Kindly tell me how can i get the code from where?

code is a dynamic value, please check step 3.

Hi mykhailo,
We are trying to Requesting authorization by using below process:
Get:
https://oauth.pipedrive.com/oauth/authorize?client_id=2db77ade856cb6c5&state=148aHxbdd921&redirect_uri=https://staging.gfah.events/

I am getting the below error:
{
“success”: false,
“error”: “unauthorized access”,
“errorCode”: 401,
“error_info”: “Please check developers.pipedrive.com
}