amplitude/Amplitude-TypeScript

Cannot initialise amplitude analytics

larkonesvk opened this issue · 2 comments

Expected Behavior

Should log event

Current Behavior

Api returns 400, invalid API key

Possible Solution

Steps to Reproduce

Screenshot 2023-03-28 at 15 56 47

When I tried call
track('BUTTON_CLICKED');
or
track('Button Clicked', undefined, { user_id: 'user@amplitude.com', });
I am getting 400
Screenshot 2023-03-28 at 15 58 43

  1. I literally just copied the api code and hardcoded it so I am sure I am using the correct API_KEY but its not working

Environment

  • Installation Method: yarn add @amplitude/analytics-react-native
  • Browser and Version: "react-native": "^0.68.2",

What I am doing wrong? The api key must be valid.

Hi @larkonesvk! Mind sharing your amplitude url so we can take a look? By any chance are you on the EU partition?

Sorry for late response, but yes I am on EU partition. I think setting the setServerZone fixed the issue.