Send API request with IP that user provided
i want to send a request to an API and i dont want the api backend recognise the sender ip , i want it to think im using the IP that i provided.
15 Replies
unless you use a vpn, proxy or an ssh tunnel, no, you can't
What are you trying to do? Maybe there are other ways to get around this. But the above is correct: the only real way of enforcing the IP is using something like a VPN.
any API request you do (barring the VPN, proxy, or ssh tunnel already mentioned) will use the IP of the machine initiating the request.
If it's running in the front-end (in the user's browser), it will be the IP the user has. Either the one they have from their ISP, or from their VPN provider
If it's running on the back-end (in nodejs, by the tag in your question), it will use the IP of your server.
😥
I don't understand the use case though
The api provider, they link the account with the ip where the account was created . Automatic the api which authen w the user account need the ip too
you'd have to run it in the backend then, and associate the account with that IP
are you sure this IP is intended to use to provide a service to others though? (and more importantly, is it allowed?)
i think i know what he wants
he wants to implement an api from the front-end, but the api uses the ip to lock down on who can use the authorization token
how close am i from what you want?
I think u r close
you shouldn't give access tokens for third party APIs to your users anyway
it's a terrible idea
"terrible" is, usually, an understatement, specially if it is an api that has paid tiers and rate limits
you need a backend of some sort in between the user and the api
okay.... tks for helping guys ;-;
their announcement if you guys still confuse
the authen stuff go through token of each account
which api is it?