Yes, it is possible. We do that in the PHP Classes site, not specifically with Pinterest nor Twitter, but others like for instance Google APIs. Since those are all based on OAuth, the principle is the same. Just follow these steps and let me know if you have difficulties:
1. Take a look at the script that comes with the class named file_login_with_google.php.
phpclasses.org/package/7700-PHP-Aut
...
You can create a version of this script to access Pinterest or Twitter API, named for instance file_login_with_pinterest.php
It calls a sub-class that comes with the package named file_oauth_client_class .
2. Use the file_login_with_pinterest.php script you created as as Web page to obtain the OAuth authorization token and store it in a file.
3. Create console based scripts that use the file_oauth_client_class just to make the API calls to Pinterest API that you need.
Name that script something like file_offline_access_to_pinterest.php .
It is similar to this other example script but this one uses MySQL to store API tokens instead of files.
phpclasses.org/package/7700-PHP-Aut
...
4. Then just make any API calls that you need to call Pinterest API using the class CallAPI function.
Was this clear?