We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$process = curl_init("https://b2bapi.onliner.by/oauth/token"); curl_setopt($process, CURLOPT_HTTPHEADER, array('Accept: application/json','Content-Type: application/x-www-form-urlencoded')); curl_setopt($process, CURLOPT_USERPWD, "ClientID:SecretKey"); curl_setopt($process, CURLOPT_POST, 1); curl_setopt($process, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($process, CURLOPT_POSTFIELDS, array('grant_type' => 'client_credentials')); $result = curl_exec($process); curl_close($process);
возвращает пустую строку, через PostMan у менеджера onliner удалось получить токен
The text was updated successfully, but these errors were encountered:
Попробуйте повторить запрос с этим кодом, только не передавайте Content-Type в заголовке.
Content-Type
Пример:
curl_setopt($process, CURLOPT_HTTPHEADER, array('Accept: application/json'));
Sorry, something went wrong.
No branches or pull requests
возвращает пустую строку, через PostMan у менеджера onliner удалось получить токен
The text was updated successfully, but these errors were encountered: