我正在建立一个网站,允许用户搜索和发送一个快照片照片像这样:https://wallprint.ee/
我正在关注Shutterstock API文档并尝试使用它来连接,搜索和选择照片:https://github.com/shutterstock/php-shutterstock-api
这是最好最简单的方法吗?!!
这是我现在尝试的方式:
require_once __DIR__ . '/vendor/autoload.php';
$clientId = '***';
$clientSecret = '****';
$client = new Shutterstock\Api\Client($clientId, $clientSecret);
var_dump($client);
// perform an image search for puppies
$client->get('images/search', array('query' => 'puppies'));
$imageResponse = $client->get('images', array('id' => array(1, 2, 3)));
if ($imageResponse->getStatusCode() != 200) {
// error handler
}
$images = $imageResponse->getBody()->jsonSerialize()['data'];
// etc
我期望:对内容有一些回应。我得到了客户端错误:GET https://api.shutterstock.com/v2/images?id=1&id=2&id=3
导致了403 Forbidden
响应:{“message”:“您无法访问此路由。请联系[email protected]获取更多信息”}我读过,因为我使用'get'我是告诉我一个免费的APP不能用get:https://developers.shutterstock.com/documentation/authentication#accounts-and-limitations我写的那个已经到了[email protected]
但是我有什么选择以最简单和无痛的方式开发它?
我是Errol,我在Shutterstock处理API。通常,您将收到此错误,因为您的应用无权调用该路由。
不幸的是,如果没有与Shutterstock建立印刷合作伙伴关系,就没有其他选择可以实现墙版印刷。我们希望您能够访问所需的API端点,就像您自己的开发人员可以创建出色的应用程序一样,但是,它需要以不违反Shutterstocks许可证或服务条款的方式完成。
如果您对此有任何疑问或疑虑,请发送电子邮件至[email protected]