APIs & Integrations

byersoy
メンバー

Get recently created contacts api, same data problem

解決

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 いいね!
1件の承認済みベストアンサー
IsaacTakushi
解決策
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

解決

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 いいね!
9件の返信
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

解決

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 いいね!
byersoy
メンバー

Get recently created contacts api, same data problem

解決

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 いいね!
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

解決

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 いいね!
byersoy
メンバー

Get recently created contacts api, same data problem

解決

Hi, @IsaacTakushi 

 

Webhook object list only hubspot has special fields?

 

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

0 いいね!
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

解決

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 いいね!
byersoy
メンバー

Get recently created contacts api, same data problem

解決

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 いいね!
IsaacTakushi
解決策
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

解決

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 いいね!
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get recently created contacts api, same data problem

解決

Hey, @byersoy.

 

I've responded to your direct message.

Isaac Takushi

Associate Certification Manager
0 いいね!
byersoy
メンバー

Get recently created contacts api, same data problem

解決

Hi @IsaacTakushi 

 

I try,

 

I created new contact but not changed events.

 

Look at event subscriptions;

 

hubspot_community.jpg

0 いいね!