Invalid parameter : code , when trying to setup authorization

Hi there,

We just started setting up our Pipedrive integration and I am running into an issue that my request to get the Oauth token always results in:

{“success”:false,“message”:“Invalid parameter: code”,“error”:“invalid_request”}

The request is build as followed (using the base64 as authorization)

Request content for POST request to https://oauth.pipedrive.com/oauth/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Authorization: (omitted)

grant_type=authorization_code&redirect_uri=http://localhost:8080/link/pipedrive&code=12539020.18836726.d40a14b7b7b1da9b8fb3e328d34ee997cc213c10

I am trying to understand why the code is invalid. It is the correct code that is send back so what am i missing here?

Hi @JarnoPSOhub, welcome to the community!

In a glance, the request structure looks good to me.
Maybe it’s worth checking the code itself, the authorization code expires fast (in about 5 minutes), and cannot be used a second time.