You describe the desire for pre-authentication.
IP will always be available. You can limit the service to only these IP ranges. This is not a good way to do authentication.
An attempt to bypass authentication is unsafe. You must use the correct authentication method. Combining IP restrictions with other methods is fine.
John Meyer's answer is, in essence, user authentication based on token sharing. The presence of a valid token consists of the fact that it constantly enters the system. A token can be compromised much more easily than conventional token-based authentication, which sets a temporary token with a limited lifetime.
If you decide to follow the preliminary marker route, use a method that supports the correct rotation or rearrangement of the token over time, so that it is not vulnerable to repeated attacks.
The best option for this scenario is a typical token based user authentication.
If you are really not interested in who uses your service, only to be uniquely identified, you can safely set a cookie for each user (or a permanent or arbitrary lifetime) using the http Set-Cookie header, which all clients should automatically respect and support and then use this as your tracking method.
TylerY86
source share