Not able to fetch data using amplitude api.

  • 11 March 2022
  • 5 replies
  • 392 views

Badge

Hello Guys,
I am trying to get data through amplitude api, but I am not able to fetch any data. It's either not returning any data and it's also not showing any error.
I am using your api services to get data. I am using python as my backeend.
This is one of the api, which I am using. I am using it with key and secret.


api = https://amplitude.com/api/2/users?start=20220301&end=20220311
It's not returning any user detail. It’s only returning dates only.

Please let me know what am I doing wrong here.

Thanks


5 replies

Userlevel 4
Badge +8

@Harpreet quick disclaimer that I am by no means an expert on this. To clarify, you are not seeing the data.series object in your response, only the data.xValues objects, which has the dates? Any chance you could include a screenshot of the response?

Badge

Okay @SheenaGreen  I will provide you screenshot and i need  api  to get user data by user id.

Userlevel 6
Badge +8

Hi @Harpreet ,

 

Thanks for writing into the Community! 

 

So you are using the REST API here to get Active and New Users. You need to be an Admin to have access to the API Keys, which I assume you do have access. I am attaching an example call. Did you make sure you are targeting the right project and there is data for between those two dates?

 

If it is still not working, please PM me the chart you are targeting, the Project ID you are targeting and the email address you use for Amplitude, I can then investigate. 

 

Kind Regards,
Denis

 

Badge

Thank you @Denis Holmes  I will check it and let you know.

Badge

Hello guys,

I used the API and posted my GAID to amplitude and I got a success response, but when I check the user properties of the user, the GAID that I passed doesn't show on the UI.
Can someone help me out 

API- https://api2.amplitude.com/attribution?api_key=XXXX&event={"event_type":"[YOUR COMPANY] Install","adid": "XXXX", "user_properties": {"[YOUR COMPANY] media source": "facebook", "[YOUR COMPANY] campaign": "refer-a-friend"}, "platform": "android"}
 

Reply