Http POST not working from php

Hi
I am trying to call an API that is hosted OUTSIDE of your hosting service. the code that i am using a standard php post request using Json::decode($data).
the api is working well as i have tested it.

I know you don’t allow API’s to be hosted on your side, but do you block outside API as well ?

To my knowledge this hosting supports outside apis.But you said “not working” in title and pretty much you didn’t tell why you think it isn’t working.Maybe you can share your url?

1 Like

it’s not working because i don’t get the specfied response and as i don’t have access to the logs i can’t check the logs. the url is paste.malhotra [dot] me
when i try to create a short cut URL i don’t really get anything. i don’t see it reaching the service

The url you shared works perfectly for me.Are you sharing the api provider’s site?Please share your own site if that’s the case. :grinning:

The issue is with shortning the URL … after a bit of digging in i found this warning in the php code

file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

not sure why the webserver is caching the ssl certificate? i have recently moved this sites hosting and issued a new certificate. the cert is correct from what i can see on the browsers…

Sound like this

that doesn’t sound correct as the certificate is issued by let’sEncrypt. the same provider that this hosting is using. i have tried it on my own server / desktop and the cert is valid.

You can check the Cert on ssl-checker

I have limited knowledge over the ssl stuff so sadly I can’t give more information.However,the php scripts are running on servers.If it is really caching certs,than you should wait.Or maybe you can use it without ssl?Then there won’t be any certificate issues any more.

I have never had this issue before when i have moved between hosts…

unfortunately can’t use this without the https :frowning:

Anyone from the server team can answer this?

This is funny.
You are having issues with something that is not hosted here.
Seek help from the relevant party, not here

thanks for the response…
the issue is not with the called API but the calling site. I have checked the API that is being called and i do get responses elsewhere.

Can you please share your URL?

1 Like

I believe that TeeruKu has already shared the url,but for some reason it was not properly formatted.

Yep, that’s right. I think I got a bit confused :slight_smile:

@TeeruKu, your account appears to be suspended. Can you check the client area for a reason?

2 Likes

All clear now!

Waiting seems to have fixed it!! or was it the disable → enable switch… anyway works now.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.