December 4th, 2011

Last March Jasmine started talking to me about Pinterest in terms that made me pay attention. Since then I’ve been keeping an eye on it. A few weeks ago I decided to “cheat” my way into participation by writing a quick script to sync my Etsy favorites to a board.

Per request, I just pushed my PHP library for the unofficial Pinterest API up to Github. It’s a simple thing, more suitable for forking then using as is, and with some serious gaps where I simply haven’t had the time to find (assuming they exist) API methods for simulating the “pinmarklet” (as opposed to uploading), and for backing up pins.

Tagged: Uncategorized

20 responses to “pinterest.api.php”

  1. […] official API yet, but that hasn’t stopped Kellan. This entry was written by Sean Flannagan, posted on 07 Dec 2011 at 12:53 am, filed under Books, […]

  2. Aaron says:

    Thanks for putting your library on github! Quick questions, where / how can I get the $clientid and $clientsecret params for the $fetchaccesstoken function?

  3. Mike says:

    I have tried following these instructions using Charles and I see the following error

    SSLHandshake: Remote host closed connection during handshake

    Has this happened to you before?

  4. Kellan says:

    Mike, sounds like you might have grabbed pinterest’s SSL cert rather then Charles. Was pointed out to me that you can get the Charles cert from here without the steps above:

  5. Yashh says:

    Well we have been delaying the pinterest API launch due to our changes in infrastructure. We did not want the developers to deal with the change in ids etc. Jan 10 2012 will be the official data when we will open up the API. I will write an email to all the people on the waiting list. Also the new API will be v2 and v1 will be deprecated in March.

  6. Tim says:

    Lots of nostalgia seeing the Magpie code in your Github repository. Thank you again for the little project.

  7. batpigandme says:

    Hey all- ran into this very helpful discussion while (obviously) trying to automate some pinterest posting of my own, and am wondering if anyone has made any progress or knows the status of the official pinterest API

  8. Charles says:

    What is the current timing of the API? We have a project with a quickly approaching deadline and we are hoping to allow our users to share on pinterst. Thanks.

  9. Martijn The says:

    Thanks for this Kellan. It looks like the latest Pinterest app is using v2 now. I’m going to give your code a spin and see if it still works.


  10. Umesh Kulkarni says:

    Hi Guys,

    I have tried using all the possibilities but still its giving 404 error.

    Any success with API?

  11. Kellan says:

    I haven’t tried using it in a month or so, it’s quite possible that the clientid or the entire library is out of date since the lastest app release.

  12. Adam says:

    Hey Martijn,

    Any luck? Before we start attempting this ourselves, just curious how you’re going with it…

    Thanks, Adam

  13. blake says:

    How do you get on the waiting list for the official Pinterest API?

  14. Hello All,

    I need to synchronize my pins with my account is this API still working some how or I have to start scratch?

    Waiting for a reply, Thanks.


  15. Kellan says:

    Pushed some changes yesterday to work with v2

  16. Ashwin says:


    I have download your pinterest api can you give me example how to get popular list from pinterest and what is $clientid and $clientsecret; how to obtain it.

    please give step by step guide.

    Thanks & Regards, Ashwin Parmar

  17. dhanesh mane says:

    hi aaron

    Before a client application can request access to resources on a resource server, the client application must first register with the authorization server associated with the resource server. At registration the client application is assigned a client ID and a client secret (password) by the authorization server.

  18. Sam says:

    Great api. but how to get $clientid, $clientsecret seems i got a 404 page when accessing the official api page

  19. Kevin says:

    Great work figuring out the API, but can you clarify a little more on client ID & secret? Do they uniquely identify a user or an authorized app?

    Assuming it’s an app, since the API is not publicly open and thus we can’t register apps with Pinterest, wouldn’t the Pinterest app be the only app with its own client ID & secret? If I got the Pinterest app’s ID & secret via Charles, could I have my app use them?

    I’m trying to make an app from which users can pin images they like, but I can’t see how to get the client secret & ID to use in the API if those are phone-specific.