#devendra_api

1 messages · Page 1 of 1 (latest)

cyan flowerBOT
#

👋 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.

median steeple
#

From what IP you are trying to access the Stripe API ?

simple topaz
#

I'm sharing my code

median steeple
#

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

simple topaz
#

18.168.9.122

that is my server IP. there is backend on this IP

median steeple
#

How are you getting this IP?

simple topaz
#

The serve guy give me this IP and this same IP use for uploading code on server.

median steeple
#

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 ?

simple topaz
#

Yes. that is correct IP and there is the code also upload on this IP and the same IP use for Ssh login.

median steeple
#

Have you tried to do ssh to that IP and run curl request to the same Stripe APi using that secret key ?

simple topaz
#

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.

median steeple
#

This one mk_1SfzgjIE5Vvk0efGIWaOR732

simple topaz
median steeple
#

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...

simple topaz
#

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.

median steeple
median steeple
#

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

simple topaz
median steeple
#

Yes

simple topaz
#

Okay just wait for 2 mint

cyan flowerBOT
simple topaz
#

please check IP is correct

median steeple
#

nice, now can you make another curl request to Stripe API using the restricted API key ?

median steeple
simple topaz
#

its working fine.
getting resppoonse of file>

#

in terminal curl hit

#

I just hit curl for file retrilve not

\Stripe\FileLink::create

this

half blaze
#

so the curl command is working with the restricted key, but not your code?

simple topaz
#

Yes.

half blaze
#

and both are done on the same machine?

simple topaz
#

sorry I'm not understand.

half blaze
#

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?

simple topaz
#

Yes on same server.

half blaze
#

and are you using the same API key?

simple topaz
#

Yes.

half blaze
#

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
simple topaz
#

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?

half blaze
#

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.

simple topaz
#

Okay thank you for support me alot. I'll found out what the exactly IP used.

cyan flowerBOT
simple topaz
#

Hi add all of these but still getting this issue.

exotic root
#

👋 Hi there! I'm taking over for my colleague. Let me take a look

#

In the meantime, do you have a request ID from the failed API request?

#

I'm seeing successful requests now

#

I think the last failed request I saw was before the key's IP addresses were updated in the Dashboard