Download the PHP package pinterest/laravel-sdk without Composer

On this page you can find all versions of the php package pinterest/laravel-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sdk

Laravel Pinterest SDK

A Laravel-native SDK for the Pinterest API v5. Provides a clean, expressive interface for interacting with Pinterest's boards, pins, ads, and user accounts using Laravel's HTTP client.

Requirements

Installation

Install the package via Composer:

The service provider and facade are auto-discovered by Laravel.

Publish Configuration

This publishes config/pinterest.php to your application.

Configuration

Add the following to your .env file:

Full Configuration Options

Key Env Variable Default Description
client_id PINTEREST_CLIENT_ID '' Pinterest App ID
client_secret PINTEREST_CLIENT_SECRET '' Pinterest App Secret
redirect_uri PINTEREST_REDIRECT_URI '' OAuth callback URL
access_token PINTEREST_ACCESS_TOKEN '' Bearer access token
refresh_token PINTEREST_REFRESH_TOKEN '' OAuth refresh token
api_version PINTEREST_API_VERSION v5 API version
base_url PINTEREST_BASE_URL https://api.pinterest.com API base URL
oauth_url PINTEREST_OAUTH_URL https://www.pinterest.com/oauth/ OAuth URL
scopes PINTEREST_SCOPES boards:read,pins:read,user_accounts:read OAuth scopes
timeout PINTEREST_TIMEOUT 30 Request timeout (seconds)
retry.times - 3 Max retry attempts
retry.sleep - 100 Retry delay (milliseconds)

Usage

All API interactions are available through the Pinterest facade.

Boards

Pins

User Account

Pagination

Pinterest uses cursor-based pagination with bookmark tokens. The SDK handles this transparently:

OAuth Flow

The SDK provides a complete OAuth2 authorization code flow:

Ads API

All ads endpoints require an ad account ID:

Media Upload

Error Handling

The SDK throws typed exceptions for different error scenarios:

Working with Responses

All API calls return an ApiResponse (or PaginatedResponse for list endpoints):

Dynamic Token Switching

Available Services

Method Service Description
boards() BoardsService Boards + sections CRUD, list pins
pins() PinsService Pins CRUD, save pins
user() UserService Account info, analytics
media() MediaService Media upload registration
adAccounts() AdAccountsService Ad accounts list/get/analytics
campaigns() CampaignsService Campaigns CRUD, analytics
adGroups() AdGroupsService Ad groups CRUD, analytics
ads() AdsService Ads CRUD, analytics
audiences() AudiencesService Audiences CRUD
conversions() ConversionsService Conversion events + tags
customerLists() CustomerListsService Customer lists CRUD
keywords() KeywordsService Keywords CRUD, metrics
oauth() OAuthService Authorization + token management

Testing

Static Analysis

Code Formatting

Architecture

The package follows a layered architecture:

License

The MIT License (MIT). See LICENSE.md for more information.


All versions of laravel-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0
illuminate/support Version ^11.0||^12.0
illuminate/http Version ^11.0||^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pinterest/laravel-sdk contains the following files

Loading the files please wait ...