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
ἔρως
ἔρως4mo ago
unless you use a vpn, proxy or an ssh tunnel, no, you can't
Joao
Joao4mo ago
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.
Jochem
Jochem4mo ago
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.
.`noob`.
.`noob`.4mo ago
😥
Jochem
Jochem4mo ago
I don't understand the use case though
.`noob`.
.`noob`.4mo ago
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
Jochem
Jochem4mo ago
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?)
ἔρως
ἔρως4mo ago
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?
.`noob`.
.`noob`.4mo ago
I think u r close
Jochem
Jochem4mo ago
you shouldn't give access tokens for third party APIs to your users anyway it's a terrible idea
ἔρως
ἔρως4mo ago
"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
.`noob`.
.`noob`.4mo ago
okay.... tks for helping guys ;-;
.`noob`.
.`noob`.4mo ago
their announcement if you guys still confuse
No description
.`noob`.
.`noob`.4mo ago
the authen stuff go through token of each account
ἔρως
ἔρως4mo ago
which api is it?
Want results from more Discord servers?
Add your server