1

I am making a site that allows users to search and send to print a Shutterstock photo Like this one: https://wallprint.ee/

I am following the Shutterstock API documentation and trying to use this to connect, search and pick photos: https://github.com/shutterstock/php-shutterstock-api

Is this the best and easiest way to do it?

This is the way I am trying now:

<?php

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

I expected:
Some kind of response with the content.
I got

Client error: GET https://api.shutterstock.com/v2/images?id=1&id=2&id=3 resulted in a 403 Forbidden response: {"message": "You do not have access to this route. Please contact api@shutterstock.com for more information"}

I read that since I use 'get', I am told that a free APP can't do using get: https://developers.shutterstock.com/documentation/authentication#accounts-and-limitations. I wrote about that already to api@shutterstock.com.

But what options do I have to develop it in a simplest and painfree manner?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user2551737
  • 65
  • 10

1 Answers1

1

I'm Errol and I work on the API here at Shutterstock. Typically, you will receive this error because your app does not have access to call that route.

Unfortunately, there is no other options to achieve what wallprint is doing without having print partnership with Shutterstock. We want you to have access to the API endpoints you need that way developers like yourself can create awesome apps, however, it needs to be done in a way that doesn't violate Shutterstocks license or terms of service.

Should you have any questions or concerns about this, please drop us a message at api@shutterstock.com

Errol Green
  • 1,367
  • 5
  • 19
  • 32