Build an OAuth authorization URL
pinterest_build_oauth_urlBuild a Pinterest OAuth consent URL to open in a browser, then exchange the returned code for access tokens. Makes no network call.
Instructions
Build the Pinterest consent URL to open in a browser. The user approves, Pinterest redirects to your redirect_uri with a code query parameter, and you exchange that code with pinterest_exchange_oauth_code. Makes no network call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | Opaque value echoed back on redirect. Use it to defend against CSRF. | |
| app_id | No | Pinterest app id. Falls back to the PINTEREST_APP_ID environment variable. | |
| scopes | No | Scopes to request. Defaults to: user_accounts:read, boards:read, boards:write, pins:read, pins:write. | |
| redirect_uri | No | Must match a redirect URI registered on the app exactly. Falls back to PINTEREST_REDIRECT_URI. |