APIs & Integrations

BalajiR
Member

Engagement Get All API not returning Data

Hi,

I am trying create CALL engagement in Hubspot using Engagement API.  

I getting a success in create API response. If I try to get the engagement using ID or get All API it is returning {}. 

 

create response from hubspot: 

 data: {
associationCreateFailures: [],
engagement: {
id: 7741907259,
portalId: 7988973,
active: true,
createdAt: 1593808756879,
lastUpdated: 1593808756879,
createdBy: 10799340,
modifiedBy: 10799340,
ownerId: 1,
type: 'CALL',
timestamp: 1409172644778,
allAccessibleTeamIds: [],
queueMembershipIds: [],
bodyPreviewIsTruncated: false,
gdprDeleted: false
},
associations: {
contactIds: [],
companyIds: [],
dealIds: [],
ownerIds: [],
workflowIds: [],
ticketIds: [],
contentIds: [],
quoteIds: []
},
attachments: [ [Object] ],
metadata: {
toNumber: '5618769964',
fromNumber: '(857) 829-5489',
status: 'COMPLETED',
durationMilliseconds: 38000,
recordingUrl: 'https://api.twilio.com/2010-04-01/Accounts/AC890b8e6fbe0d989bb9158e26046a8dde/Recordings/RE3079ac919...'
}

0 Upvotes
5 Replies 5
Willson
HubSpot Employee
HubSpot Employee

Engagement Get All API not returning Data

Hey @BalajiR 

 

Are you receiving any errors when making the request to get the engagement by the ID generated in the initial request?

 

If so, are  you able to attach this here along with the Request URL you're using? 

 

Thanks!

Product Manager @ HubSpot
0 Upvotes
BalajiR
Member

Engagement Get All API not returning Data

Hi @Willson ,

 

I am using this url to get the engagement:

I didn't get any errors geting only {} as response from this URL.
 
0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Engagement Get All API not returning Data

Hey @BalajiR 

 

I was just able to test this internally and received a 200 OK with the following response:

{
engagement:{
id:7741907259,
portalId:xxxxxxx,
active:true,
createdAt:1593808756879 (July 3, 2020, Fri, 9:39:16pm UTC+01:00),
lastUpdated:1593808756879 (July 3, 2020, Fri, 9:39:16pm UTC+01:00),
createdBy:10799340,
modifiedBy:10799340,
ownerId:1,
type:"CALL",
timestamp:1409172644778 (August 27, 2014, Wed, 9:50:44pm UTC+01:00),
allAccessibleTeamIds:[ ],
queueMembershipIds:[ ],
bodyPreviewIsTruncated:false,
gdprDeleted:false},
associations:{
contactIds:[ ],
companyIds:[ ],
dealIds:[ ],
ownerIds:[ ],
workflowIds:[ ],
ticketIds:[ ],
contentIds:[ ],
quoteIds:[ ]},
attachments:[
{id:4241968539}],
metadata:{
toNumber:"5618769964",
fromNumber:"(857) 829-5489",
status:"COMPLETED",
durationMilliseconds:38000,
recordingUrl:"https://api.twilio.com/xxxx"}}

Are you able to test this using a REST client such as Postman to see if you encounter the same issue? Thanks!

Product Manager @ HubSpot
0 Upvotes
BalajiR
Member

Engagement Get All API not returning Data

Hi @Willson ,

 

Thanks for it @Willson.  Now it is working. After I created the engagement where I can able to find it with in hubspot. Can you guide on it.

 

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Engagement Get All API not returning Data

Hi @BalajiR 

 

You can find the engagement associated to the record ID you assigned in the associations parameter of your request. 

 

i.e Contact with ID 12345

Product Manager @ HubSpot
0 Upvotes