Skip to main content

Not able to fetch data using amplitude api.


Forum|alt.badge.img

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

SheenaGreen
Super Helper
Forum|alt.badge.img+8
  • Super Helper
  • 60 replies
  • March 11, 2022

@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?


Forum|alt.badge.img
  • Author
  • New Member
  • 2 replies
  • March 14, 2022

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


Denis Holmes
Team Member
Forum|alt.badge.img+8
  • Team Member
  • 448 replies
  • March 14, 2022

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

 


Forum|alt.badge.img
  • Author
  • New Member
  • 2 replies
  • March 15, 2022

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


Forum|alt.badge.img
  • Novice
  • 3 replies
  • September 14, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings