#devendra_api
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1451504062276304937
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
From what IP you are trying to access the Stripe API ?
Thanks, but I need your IP address please.
From where you are running that code ?
Your API key is configured to access Stripe API only from this IP address: 18.168.9.122
18.168.9.122
that is my server IP. there is backend on this IP
How are you getting this IP?
The serve guy give me this IP and this same IP use for uploading code on server.
You need to double check if this is the right IP that your code is triggering the IP or not
Have you tried to run a curl request from the server directly ?
Yes. that is correct IP and there is the code also upload on this IP and the same IP use for Ssh login.
Have you tried to do ssh to that IP and run curl request to the same Stripe APi using that secret key ?
Yes, all my APIs work correctly with the secret key.
The issue only occurs when I use the generated key for the verification report — that’s when this error appears.
Are you looking into this.
I mean with the generated restricted key
This one mk_1SfzgjIE5Vvk0efGIWaOR732
this is the ID and when i use estricted key which i already share in my code then it give me error.
Yes, can you make ssh to your server and make the corresponding curl request using that restricted API key
not via your code or any deployment
We need to make sure that your are making the API call from that IP address
And as I don't have access to your infrastructure, I can debug it. we need to proceed by elimintation and make sure that you are calling from that IP
Like there is no outbound service, or a proxy in front of your server for example...
the curl request from direct ssh for this we need to make a lot changes. becuase we are in laravel project.
Is there anyway to verify the IP.
No I mean just doing a quick test and not updating your integration for the production usage
You need to check with your infrastructure provider
And double check if you have a reverse proxy.
You can also do a test from your server to another test server and see from what IP you are making the requests exactly
You can try calling this for example, from your server
curl https://ipinfo.io/ip
And see what is your real IP
curl https://ipinfo.io/ip
okay this one hit on terminal after login with ssh deatils
Yes
Okay just wait for 2 mint
nice, now can you make another curl request to Stripe API using the restricted API key ?
From this same ssh session
its working fine.
getting resppoonse of file>
in terminal curl hit
I just hit curl for file retrilve not
\Stripe\FileLink::create
this
so the curl command is working with the restricted key, but not your code?
Yes.
and both are done on the same machine?
sorry I'm not understand.
when you run your code, and when you sent the curl command, both where done on the same server or computer?
alors can you triple check that you used the same secret key in both cases?
Yes on same server.
and are you using the same API key?
Yes.
ok, we checked on our end, and we see you are using 2 different IP address when calling the FileLink API: 13.40.48.26 and 3.9.175.152. but your API key is restricted to only 18.168.9.122.
so to fix this you need to either:
- update you API key to restrict it to a different IP address
- or fix your server configuration to make sure you are using the expected IP address
Can you tell me why this IP is not showing when I run
curl https://ipinfo.io/ip
in the same folder where my code exists?
I think you should focus more on your code that is making the API call to Stripe, since this is where the issue is. you would need to understand which IP address is used exactly by your code.
Okay thank you for support me alot. I'll found out what the exactly IP used.
Hi add all of these but still getting this issue.