seregazhuk / php-pinterest-bot

This PHP library will help you to work with your Pinterest account without using any API account credentials.
MIT License
416 stars 129 forks source link

401 Unauthorized #439

Closed godbout closed 5 years ago

godbout commented 5 years ago

Just wondering if any of you guys using this package has any issue with not being able to login anymore? I've been using the package for more than 6 months without issue. I've got a cron that creates a pin once a week. Started this week, I get a 401 when I try to login. Web login works without any issue. All my env files haven't been touched and are correct, so it doesn't seem that the issue is from my side. Wondering. Thanks!

godbout commented 5 years ago

The previous issue was an API error from my side. Basically I'm using Alfred on my local machine to call my own API that will use pinterest-bot. Just changed computer, forgot to add the API. Done. The call is well received, but pinterest-bot still crashes. Username/password correct. All I did on that one was updating pinterest-bot to the latest version.

[2019-02-01 02:03:33] production.ERROR: Error calling seregazhuk\PinterestBot\Api\Providers\Pins::create method. You must log in before. {"userId":1,"email":"gu
ill.bout@gmail.com","exception":"[object] (seregazhuk\\PinterestBot\\Exceptions\\AuthRequired(code: 0): Error calling seregazhuk\\PinterestBot\\Api\\Providers\\
Pins::create method. You must log in before. at /home/slmd/apps/hq.sleeplessmind.info/releases/20190131174611/vendor/seregazhuk/pinterest-bot/src/Api/Providers/
Core/ProviderWrapper.php:66)
godbout commented 5 years ago

Ok, spent quite a lot of time on this and I don't think it comes from pinterest-bot. For whatever reason it can't login sometimes. Sometimes it works after clear some cache, sometimes after restarting the php-fpm pool, sometimes after doing nothing, sometimes nothing works, just time. Not having much of an idea on what's going on but pinterest-bot seems not to be the culprit. Closing.