# Activity required from contacts Ask Nicely

**URL:** <https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [June 21, 2019, 1:51pm UTC](https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907 "2019-06-21T13:51:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dntaker](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dntaker/32/51436_2.png) [@dntaker](https://community.hubspot.com/u/dntaker)\
**Post date:** [June 21, 2019, 1:51pm UTC](https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907/1 "2019-06-21T13:51:24Z")

</div>

I’m trying to get either the latest activity or all activity, I’ve checked my code with events middle REM URL so I know it’s authenticating OK, but the results are empty any help would be great here, thanks!

'URL = “[https://api.hubapi.com/engagements/v1/engagements/paged?hapikey=demo](https://api.hubapi.com/engagements/v1/engagements/paged?hapikey=demo)”  
'URL = “[https://api.hubapi.com/reports/v2/events?hapikey=demo](https://api.hubapi.com/reports/v2/events?hapikey=demo)”  
URL = “[https://api.hubapi.com/engagements/v1/engagements/recent/modified?hapikey=demo&count=100&count=100&offset=0](https://api.hubapi.com/engagements/v1/engagements/recent/modified?hapikey=demo&count=100&count=100&offset=0)”  
response.Write URL  
response.flush  
Dim oXMLHTTP  
Set oXMLHTTP = CreateObject(“Msxml2.ServerXMLHTTP”)  
on error resume next  
oXMLHTTP.Open “GET”, URL, False  
oXMLHTTP.Send  
GetTextFromUrl = “\<br\>\<BR\>”& oXMLHTTP.responseText  
response.Write GetTextFromURL

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [June 21, 2019, 5:58pm UTC](https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907/2 "2019-06-21T17:58:38Z")

</div>

Hey @dntaker ,

I’m not particularly familiar with the language you’re using, but based on [this](https://stackoverflow.com/questions/11388714/how-do-i-use-msxml2-serverxmlhttp-to-grab-data-from-another-site)Stackoverflow post, nothing seems particularly out of order. Can you give me some more information on what exactly this line is doing?

`GetTextFromUrl = "<br><BR>"& oXMLHTTP.responseText`

I’m wondering if oXMLHTTP.responseText actually does have a value, but this line is interfering somehow? Also, can you include some more information on the headers being set here? Is it possible that you’re getting a 415 or something?

---

<div class="post-metadata">

**Author:** ![dntaker](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dntaker/32/51436_2.png) [@dntaker](https://community.hubspot.com/u/dntaker)\
**Post date:** [June 24, 2019, 12:45pm UTC](https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907/3 "2019-06-24T12:45:32Z")

</div>

All it is doing is setting a variable with a couple of breaks and the response text.

Nothing is displayed when outputting the text to the screen. Luckily the breaks don’t need to be case sensitive LOL.

The content of the responseText should contain the data right?

When I run the other URLs they seem to work OK?

---

<div class="post-metadata">

**Author:** ![dntaker](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dntaker/32/51436_2.png) [@dntaker](https://community.hubspot.com/u/dntaker)\
**Post date:** [June 24, 2019, 12:50pm UTC](https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907/4 "2019-06-24T12:50:11Z")

</div>

Just noticed the count variable was in twice.

Just taken it out no difference:

URL = “[https://api.hubapi.com/engagements/v1/engagements/recent/modified?hapikey=demo&count=100&offset=0](https://api.hubapi.com/engagements/v1/engagements/recent/modified?hapikey=demo&count=100&offset=0)”

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [June 24, 2019, 4:30pm UTC](https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907/5 "2019-06-24T16:30:04Z")

</div>

Hey @dntaker ,

Thanks for the additional information. It’s tough to say what’s going on in more detail since I’m not familiar with the language you’re using. Is there any way for you you log the full, raw response you’re getting from HubSpot, including the response code? That will likely give me more information on whether or not this is an issue on the HubSpot side.

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [June 25, 2019, 7:20pm UTC](https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907/6 "2019-06-25T19:20:57Z")

</div>

@dntaker and I touched base via private message.

The tl;dr is: The AskNicely events are custom timeline events created by the AskNicely integration, not engagements. Custom timeline events for integrations aren’t accesible via the API unless you have the external event ID that was used to create the event. This is becasue the Timeline API provides methods for an integration to create timeline events, but _does not_ provide methods for a third party (i.e. a different integration) to access those methods.

---

<div class="post-metadata">

**Author:** ![dntaker](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dntaker/32/51436_2.png) [@dntaker](https://community.hubspot.com/u/dntaker)\
**Post date:** [June 26, 2019, 12:34pm UTC](https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907/7 "2019-06-26T12:34:40Z")

</div>

Thanks for looking into this, How do I get the events if I know the event id?

Or all events if I don’t?

Which API would that be as they’re not engagements.

Best Regards

Dave

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [June 26, 2019, 2:57pm UTC](https://community.hubspot.com/t/activity-required-from-contacts-ask-nicely/14907/8 "2019-06-26T14:57:05Z")

</div>

Hey @dntaker ,

If you know the external ID for a specific event, you can use the following method:

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fmethods%2Ftimeline%2Fget-event)**

Keep in mind: There isn’t any ‘Get all’ method for Timeline events, since they were not designed to be exported by a 3rd party. If you need some sort of bulk export of AskNicely events, I’d recommend trying to do so in AskNicely.
