This is the difference between public and private.
Url Shortener API is a public API. This means that you do not need to authenticate in order to use it. This is why the API public key works. However, when you use the public api key, the api does not know who you are personally.
Solution: you need to switch to Oauth2 . Authenticate your application with an access token, and instead send the API key, send access_token. Then, when links are created, they must be added to your account, and you will get analytics for them.
source share