APIs & Integrations

byersoy
Membre

Get recently created contacts api, same data problem

Résolue

Hello,

 

I use "Get recently created contacts" api, but i have a problem 🙂

Use url: https://api.hubapi.com/contacts/v1/lists/all/contacts/recent?hapikey=1111-1111-key-key-1111-111&coun...

 

Response json have a "has-more": true, "vid-offset": 111111

 

New Url: https://api.hubapi.com/contacts/v1/lists/all/contacts/recent?hapikey=1111-1111-key-key-1111-111&coun...

 

But the first data and the second data are the same.

 

Help me!

0 Votes
1 Solution acceptée
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

Résolue

Hi, @byersoy.

 

Are you referring to not receiving webhook notifications for contact creation events?

 

If so, I see your app (ID ending in 1886) is not connected to your production HubSpot account (Hub ID ending in 8713). In order to listen for contact creation events, the app must be connected via OAuth.

Isaac Takushi

Associate Certification Manager

Voir la solution dans l'envoi d'origine

0 Votes
9 Réponses
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

Résolue

Hi, @byersoy.

 

Happy to clarify.

 

Unlike the Get all contacts endpoint, the Get recently created contacts and Get recently updated and created contacts endpoints require both the timeOffset and vidOffset parameters to page through results.

If you add the time-offset field value to your second request, it should return the next 100 contacts.

 

Apologies for the confusion.

Isaac Takushi

Associate Certification Manager
0 Votes
byersoy
Membre

Get recently created contacts api, same data problem

Résolue

Thanks for the answer @IsaacTakushi 

 

I try, example url;

 

https://api.hubapi.com/contacts/v1/lists/all/contacts/recent?hapikey=11111-11111-11111-11111&count=100&vidOffset=22222&timeOffset=33333

 

I follow if has-more == true go to next page.  But this api pulls all the data. I need them just recently added data.

0 Votes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

Résolue

Hi, @byersoy.

 

The endpoint you are using is the Get recently created contacts endpoint, so all of the data will be new.

 

The Get recently updated and created contacts endpoint will return records which have been modified, but you are correct that neither of these endpoints returns only the modified data.

 

If you only want to receive notifications for changes, the Webhooks API will probably be your best bet. You can subscribe to specific object properties and HubSpot will notify a webhook URL of your choosing whenever an object's value changes.

Isaac Takushi

Associate Certification Manager
0 Votes
byersoy
Membre

Get recently created contacts api, same data problem

Résolue

Hi, @IsaacTakushi 

 

Webhook object list only hubspot has special fields?

 

I don't see created object. Only have hubspot object.

0 Votes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

Résolue

Hi, @byersoy.

 

Are you referring to custom properties?

 

If so, you can create webhook subscriptions to custom properties, but you have to manually enter the internal name and click Create option "[internal property name]".

 

Create a webhook subscription for a custom property.jpg

Isaac Takushi

Associate Certification Manager
0 Votes
byersoy
Membre

Get recently created contacts api, same data problem

Résolue

Hi @IsaacTakushi,

 

I forgot to write;

 

I try testing button is working, but as i said before not working add new contact.

 

hubspot_community_3.jpg

0 Votes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

Résolue

Hi, @byersoy.

 

Are you referring to not receiving webhook notifications for contact creation events?

 

If so, I see your app (ID ending in 1886) is not connected to your production HubSpot account (Hub ID ending in 8713). In order to listen for contact creation events, the app must be connected via OAuth.

Isaac Takushi

Associate Certification Manager
0 Votes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

Résolue

Hey, @byersoy.

 

I've responded to your direct message.

Isaac Takushi

Associate Certification Manager
0 Votes
byersoy
Membre

Get recently created contacts api, same data problem

Résolue

Hi @IsaacTakushi 

 

I try,

 

I created new contact but not changed events.

 

Look at event subscriptions;

 

hubspot_community.jpg

0 Votes