You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,9 +66,10 @@ as a template. For basic configuration and usage you need to set the following e
66
66
```
67
67
PINTEREST_APP_ID=<app id>
68
68
PINTEREST_APP_SECRET=<app secret>
69
-
70
69
PINTEREST_REFRESH_ACCESS_TOKEN='<refresh token>'
70
+
71
71
**or**
72
+
72
73
PINTEREST_ACCESS_TOKEN='<access token>'
73
74
```
74
75
@@ -102,6 +103,7 @@ as a template. For basic configuration and usage you need to set the following k
102
103
Once you have established the keys, the client will be instantiated for you automatically.
103
104
104
105
**NOTE**:
106
+
* Setting up environment variables and config.json will result in the environment variables overriding the keys in config.json
105
107
* Setting the `access_token` (which is valid for thirty days) will require the token value to be replaced when it expires. You will need to manually reinsantiate the client when the **access_token** expires.
106
108
* Setting the `refresh_access_token` (which is valid for a year) will allow the SDK to regenerate the new access token whenever it is required.
107
109
@@ -217,6 +219,44 @@ Additional information about campaigns and campaign management can be found in:
217
219
* The [campaign objectives](https://help.pinterest.com/en/business/article/campaign-objectives) help article
218
220
* The [campaign budgets](https://help.pinterest.com/en/business/article/set-up-campaign-budgets) help article
219
221
222
+
## Advanced Options
223
+
224
+
### Importing the PinterestSDKClient
225
+
226
+
In order to access or use the client you can import the *PinterestSDKClient* and call the `create_default_client()` classmethod:
This will allow you to use the SDK Models without passing a **PinterestSDKClient** Object.
234
+
235
+
### Creating custom Pinterest SDK Clients
236
+
237
+
In order to create an object of the [**PinterestSDKClient**](./pinterest/client/__init__.py) you need to pass the access token inside the python code every time you wish to create a client or a combination of the refresh token, app id and app secret. This option is more useful if you wish to work with multiple accounts or clients at the same time.
Pinterest Python SDK is licensed under the [LICENSE](https://github.com/pinterest/pinterest-python-sdk/blob/main/LICENSE) file in the root directory of this source tree.
0 commit comments