Is it possible to get access and refresh tokens from code, which we get in redirect uri?

Hello Pipedrive,

My aim is to create a single application and publish it in the marketplace so anyone can install it from there.
My first problem here is when the user installs the application, and the authenticated user will be redirected to our application using the callback URL. In that case, we have the code within the redirect URL. So the question here is: is there any way to get the access and refresh tokens by using the code alone? (as per your documentation, we should call the API with the client id and client secret, in this case, we don’t have these two items. )because we don’t have the. Are client id and client secret mandatory to get these tokens?

The other question is, my application has different domain names, so I would like to redirect some users to specific redirect URLs. Currently, the Pipedrive supports only a single Redirect URI, so is there any way to add multiple redirect URI in a single application?

Hi @nikky_anna,

Client ID and Client secret are mandatory in order to retrieve these tokens.

As for the 2nd question, we don’t support multiple redirect URLs, but I guess you could use different browser cached information to possibly redirect, but this all depends on how/why you need to use different URLs.

1 Like