R
R
Roman2019-05-29 09:39:04
1C-Bitrix
Roman, 2019-05-29 09:39:04

Bitrix REST API not working?

Hello!
Now I am doing a BP using the rest api, and for this purpose I was allocated a test portal with a demo license.
And for some reason they don't work at all. var_dump returns null. Moreover, if I run this method in the browser with a webhook, then everything works, but using php (file_get_contents and curl) does not work
. Did someone have such a situation, and if so, how was it solved?
PS: I tried to run on OpenServer, the same problem.
Everything works fine on the battle portal.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Nikolaev, 2019-05-29
@nikolaevevge

Good afternoon, try this thing to connect curlpro.ivru.net
<?php
require_once("curlpro.php");
$cp = new curlPro;
$cp->newid("domain.com");
$cp->newuri("page.html");
$html = $cp->go()->val();
echo $html;
If the browser connects, then the data should come anyway.
Do you have curl on the server from which you are sending the request exactly working? We would try to contact another domain for the test.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question