Get contacts in Android app

Hello Pipedrive Team,

I am developing one Android mobile app. In this I need to implement functionality like user can login into there Pipredrive account and view there Pipedrive contacts.

To do this, I have first integrate oAuth2 library to do login with Pipedrive. This done successfully and I am able to do login and getting response with access token and refresh token.
Next I want to fetch contacts of logged in user using the access token I received in response of login API. So can you please help me which API I need to call to get contacts.

Please note that I need to get contacts without using API token. This is because in mobile app, we are not getting API token in response of login functionality. API token will only work in website not mobile app. So I need to get contacts using access token only.

Thanks in advance.

Best regards,

Hi @Mahesh_Talaviya!

As long as you’re including the Scopes to view Contacts, you should be able to use the GET/persons endpoint to retrieve contacts.

@David Thanks for the help. Actually I need to integrate this persons API in mobile app. So how can I access it using access token which I received in login API responce in mobile app?
This get person API, we need to pass API token to access it but I am not getting API token in responce of oAuth login API in mobile app.

Hi @Mahesh_Talaviya

If you need to use the API token, you can use

If you need to use an access token (with OAuth), you can use
and send the header

Authorization: Bearer <your-access-token>

as shown here.

Hope that helps.

1 Like

Hi @dani

Thanks for help. Its working now perfect using the new API URL you given for mobile.

Just wondering that it didn’t mentioned anywhere in documentation.

You should find it in the documentation here

It doesn’t show every possibility, but instead 3 examples that you can use for the logic on all other endpoints