Neteller REST API 出现错误 [英] Neteller REST API gives an error

查看:32
本文介绍了Neteller REST API 出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 neteller rest api,但遇到了一个问题.我收到此回复:{ "error": "invalid_client" }

I've been working with neteller rest api and I came across an issue. I am receiving this response: { "error": "invalid_client" }

我的代码是

$username = '**********';
$password = '*********************************';
$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, "https://test.api.neteller.com/v1/oauth2/token?grant_type=client_credentials");
 curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type:application/json", "Cache-Control:no-cache"));
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

$serverOutput = curl_exec($curl);

echo $serverOutput;

文档说:客户端身份验证失败(例如,未知客户端,不包含客户端身份验证,或不支持的身份验证方法).授权服务器可能会返回一个 HTTP 401(未授权)状态代码,指示哪些 HTTP 身份验证方案是支持的.如果客户端尝试通过授权"请求标头进行身份验证字段,授权服务器必须以 HTTP 401(未授权)状态响应代码并包含匹配的WWW-Authenticate"响应头字段客户端使用的身份验证方案.

但我不确定我是否完全理解这一点..

But I'm not sure I completely understand this..

我已经尝试了我在网上找到的所有可能的解决方案,但没有任何效果.我的 CURL 有问题吗?

I've tried every possible solution that I found online, but nothing works.. Is there something wrong with my CURL?

感谢您的时间.

推荐答案

如果您的 IP 被阻止,您会收到此错误消息.登录 Neteller TEST 商家站点 (test.merchant.neteller.com).如果您还没有,您将需要通过电子邮件支持来获取用户.转到开发人员/API 设置并检查 API 是否已启用以及您的 IP 是否已添加.

You get this error message if your IP is blocked. Log in to the Neteller TEST merchant site (test.merchant.neteller.com). You will need to email support to get a user if you haven't already. Go to Developer / API Settings and check that the APIs are enabled and that your IPs are added.

您需要为生产做同样的事情 (merchant.neteller.com).

You need to do the same thing for production (merchant.neteller.com).

这篇关于Neteller REST API 出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆