Motyar

@motyar

Freelance Web Developer

Static Web Hosting, made easy

Mar 31, 2016

IFTTT Hack: Save Pinterest pin Image to Dropbox

IFTTT is very helpful for automation. But few things are not possible because channels have few limitations, like Pinterest channel doesn't provide the pin Image Url.



Here we need to save the pin image when we like a pin.

In this post we are going to use Pinterest API to get ImageUrl using PinId. 

Here is the hack
Go to Pinterest API explorer and get API access Token by clicking "Get Token". A popup window will open and you will be asked to "Allow".


Here is the script 

$data = json_decode(file_get_contents("https://api.pinterest.com/v1/pins/".trim($_GET['pinId'])."/?access_token=TOKEN&fields=image"),true);
                                                                      
$imgUrl = $data['data']['image']['original']['url'];
header("Location:".$imgUrl); 

Host this PHP script somewhere, lets say at http://example.com/pinterest.php

Create a new Recipe and put the "File URL" = http://example.com/pinterest.php?pinId={{PinID}}


Thats all !!!



By :