APIs & Integrations

l_abroadwith
Member

Events triggered with cURL not visible in activity log

I’ve just created a custom event. Now, if I point my browser to http://track.hubspot.com/v1/event?_n=xxxxxxxxx&_a=xxxxxx, I can go to Reports > Events and see it in the activity log.

However, if I try the same with cURL:
curl http://track.hubspot.com/v1/event?_n=xxxxxxxxx&_a=xxxxxx

I still get a 200, but it doesn’t show in the activity log. What’s going on?

0 Upvotes
2 Replies 2
Dadams
HubSpot Employee
HubSpot Employee

Events triggered with cURL not visible in activity log

Hi @l_abroadwith

Are you escaping the ? and & in the curl command? Most shells (including bash) treat those characters as operators, which could mean that the curl command is not actually getting the full query string. Do you have better results with this:

curl http://track.hubspot.com/v1/event\?_n\=xxxxxxxxx\&_a\=xxxxxx

0 Upvotes
l_abroadwith
Member

Events triggered with cURL not visible in activity log

Yes, that works!

Thanks a lot.

0 Upvotes