Pinterest OAuth 2.0 Tutorial

Welcome! We built this tutorial to explain to developers how to start using the Pinterest API. Developers tell us that the hardest part of getting started is to authenticate successfully using OAuth 2.0. So, we put together some code and instructions that will get you through this process as fast as possible.

As noted on the cookie explanation page, we're using Google Analytics to track the use of this project. (See the explanation page for information about how to turn off this tracking.)

Why OAuth 2.0?

OAuth 2.0 is a very widely-used standard for accessing APIs. It allows a Pinterest user to say, "Yes, I am okay with your app executing API calls that access my data." It's a little tricky to use, but we think that it's so important to get security right that we decided not to cut any corners. We acknowledge that means a more up-front work, but think that you'll get through it pretty quickly. And learning how to use OAuth 2.0 will set you up for success with the API from pretty much any other company, too.

What do I need to know about using Oauth 2.0 on Pinterest?

  1. You need an active Pinterest API application.
  2. You need to get your active application's identifier (id) and secret.
  3. You need to set up this tutorial as an OAuth redirect URI for your app.
  4. You need to select Pinterest OAuth2 scopes for your application.
  5. Your app needs a login page.
  6. Your app's login page sends your user to an oauth page on www.pinterest.com.
  7. After your user indicates approval, www.pinterest.com forwards to a redirect (callback) page on your app.
  8. Your redirect page calls an oauth endpoint on api.pinterest.com.
  9. api.pinterest.com returns an access token, which is a credential that lets you perform other API calls.

Is that it?

No. But that's what you need to know to get started as quickly as possible. There's lots of more complete documentation, so we've provided some references at the bottom of this page in case you're interested.

Now what?

We need to tell you — developer-to-developer — that we're using a couple of cookies for this site. If you're interested why, read this page.

Or just click this button to get started...

References for using OAuth 2.0 with the Pinterest API