Acitivity API integration

Tejas_Deshmukh_
Level 2

Acitivity API integration

There are two ways for getting activity data by activity type Ids

1) By Rest API using activity type Id and since date next page token

2) By Bulk Import

I want to extract data from 2019-01-01T13:22:17-08:00 to 2019-01-31T13:22:17-08:00

but I am not getting any data through this , though I have data on my marketo portal on the dashboard
means getting response 200 but no activity data in it, with moreResult = False

and in bulk import file with no data getting downloaded.

: false

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Acitivity API integration

You need to provide more information. Let's see every single request and response because otherwise we cannot help you. It's not even clear which of the 2 methods you're attempting.

Also, you mean "Bulk Extract" not "Bulk Import". A single extract takes 5 different HTTP request-response transactions to complete. How could we know where you're going wrong if you don't show us what you're sending?

Highlight your JSON using the Advanced Editor's syntax highlighter so it's readable.

https://s3.amazonaws.com/blog-images-teknkl-com/syntax_highlighter.gif

Tejas_Deshmukh_
Level 2

Re: Acitivity API integration

1st API for access token

https://186-LQL-410.mktorest.com/identity/oauth/token?grant_type=client_credentials&client_id=###############&client_secret=############

2nd api fro next page token

https://186-lql-410.mktorest.com/rest/v1/activities/pagingtoken.json?access_token=************&sinceDatetime=2019-01-01T15:53:00+05:00

3rd API for activity details from next page token

https://186-lql-410.mktorest.com/rest/v1/activities.json?access_token=***********&activityTypeIds=6&nextPageToken=$$$$$$$$$$$$$$

getting result as

{"requestId":"!!!!!!!","success":true,"nextPageToken":"**********","moreResult":false}

Though activity data is there for January month in Marketo dashboard portal

SanfordWhiteman
Level 10 - Community Moderator

Re: Acitivity API integration

OK, so you're using the Get Lead Activities endpoint, not Bulk Extract.

Though activity data is there for January month in Marketo dashboard portal

Please show some Send Email activities from January in the UI (screenshot).

Also: don't use meaningless values like "!!!!!" and "$$$$$" for strings that aren't actually private. If you want to obfuscate them for some reason, use a reasonable representative string. Obfuscating the credentials and tokens I can understand.

Tejas_Deshmukh_
Level 2

Re: Acitivity API integration

Dashboard.png

Tejas_Deshmukh_
Level 2

Re: Acitivity API integration

as screen shot activities are there...
am I going wrong anywhere...?

SanfordWhiteman
Level 10 - Community Moderator

Re: Acitivity API integration

Rather than Email Insights, build a Smart List and show the Activity Log + Activity Log Item Detail for a couple of example leads that had a Sent Email activity logged in January.