English
English
Appearance
English
English
Appearance
/public/account/pinterest/authorizeReturns the URL of Pinterest's OAuth authorization page. After the user approves, Pinterest redirects back to your redirect URL with an authorization code to pass to Connect Pinterest.
Authorization: Basic Base64(AccessKey:SecretKey))| Parameter | Type | Required | Description |
|---|---|---|---|
redirect | string | Yes | The URL Pinterest will redirect to after authorization. |
curl -X GET "https://api.repliz.com/public/account/pinterest/authorize?redirect=https://repliz.com" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"import axios from 'axios';
const response = await axios.get(
'https://api.repliz.com/public/account/pinterest/authorize',
{
params: {
redirect: 'https://repliz.com',
},
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
},
);
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch(
'https://api.repliz.com/public/account/pinterest/authorize?redirect=https://repliz.com',
{
headers: {
Authorization: `Basic ${credentials}`,
},
},
);
const data = await response.json();
console.log(data);{
"url": "https://www.pinterest.com/oauth/?client_id=1614737&redirect_uri=https%3A%2F%2Frepliz.com%2Fcallback%2Fpinterest&response_type=code&scope=user_accounts%3Aread%2Cboards%3Aread%2Cboards%3Awrite%2Cpins%3Aread%2Cpins%3Awrite&state=9c77913d77d95fdbacebbab3d0cdf5523fac3697c8ad5ecc21a3d87397185838890a3bbf77833248952f92b0ca83c8f6"
}{
"code": 401,
"message": "unauthorized"
}