dirkgroenen / pinterest-api-php

A PHP wrapper for the official Pinterest API. :pushpin:
https://developers.pinterest.com/docs/getting-started/introduction/
Apache License 2.0
173 stars 76 forks source link

403 error when trying to Pin using token #57

Closed evivz closed 8 years ago

evivz commented 8 years ago

PHP Fatal error: Uncaught exception 'DirkGroenen\Pinterest\Exceptions\PinterestException' with message 'Pinterest error (code: 403) with message: Forbidden' in /home/customer/pino/vendor/dirkgroenen/pinterest-api-php/src/Pinterest/Transport/Request.php:227 Stack trace:

0 /home/customer/pino/vendor/dirkgroenen/pinterest-api-php/src/Pinterest/Transport/Request.php(98): DirkGroenen\Pinterest\Transport\Request->execute('POST', 'https://api.pin...', Array)

1 /home/customer/pino/vendor/dirkgroenen/pinterest-api-php/src/Pinterest/Endpoints/Pins.php(66): DirkGroenen\Pinterest\Transport\Request->post('pins', Array)

2 /home/customer/pino/index.php(18): DirkGroenen\Pinterest\Endpoints\Pins->create(Array)

3 {main}

thrown in /home/customer/pino/vendor/dirkgroenen/pinterest-api-php/src/Pinterest/Transport/Request.php on line 227

Fatal error: Uncaught exception 'DirkGroenen\Pinterest\Exceptions\PinterestException' with message 'Pinterest error (code: 403) with message: Forbidden' in /home/customer/pino/vendor/dirkgroenen/pinterest-api-php/src/Pinterest/Transport/Request.php:227 Stack trace:

0 /home/customer/pino/vendor/dirkgroenen/pinterest-api-php/src/Pinterest/Transport/Request.php(98): DirkGroenen\Pinterest\Transport\Request->execute('POST', 'https://api.pin...', Array)

1 /home/customer/pino/vendor/dirkgroenen/pinterest-api-php/src/Pinterest/Endpoints/Pins.php(66): DirkGroenen\Pinterest\Transport\Request->post('pins', Array)

2 /home/customer/pino/index.php(18): DirkGroenen\Pinterest\Endpoints\Pins->create(Array)

3 {main}

thrown in /home/customer/pino/vendor/dirkgroenen/pinterest-api-php/src/Pinterest/Transport/Request.php on line 227

dirkgroenen commented 8 years ago

Are you sure the scopes are correct?

evivz commented 8 years ago

Yes!

The code works on localhost (my mac) but not on Server :(

dirkgroenen commented 8 years ago

In that case I highly doubt that it has anything to do with the plugin. The plugin catches the error message returned by Pinterest correctly.