https://github.com/gearplug/tiktok-marketing-python
Python developed library for tiktok marketing api
https://github.com/gearplug/tiktok-marketing-python
Last synced: 8 months ago
JSON representation
Python developed library for tiktok marketing api
- Host: GitHub
- URL: https://github.com/gearplug/tiktok-marketing-python
- Owner: GearPlug
- License: mit
- Created: 2022-01-20T13:14:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-15T17:08:40.000Z (about 3 years ago)
- Last Synced: 2025-04-30T05:29:46.224Z (about 1 year ago)
- Language: Python
- Size: 34.2 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tiktok-marketing-python
Python developed library for [tiktok marketing api](https://ads.tiktok.com/marketing_api/docs)
## Installing
```
pip install git+https://github.com/GearPlug/tiktok-marketing-python.git
```
## Usage
### Using this library with OAuth 2.0
#### Client instantiation
```python
from tiktok_marketing import TikTokClient
client = TikTokClient('your_app_id', 'your_secret')
```
#### Get authorization url
```python
# state is optional
url = client.auth.get_authorization_url("your_redirect_url", state="your_state")
```
#### Exchange the auth_code for an access_token
```python
response = client.auth.authenticate(auth_code)
access_token = response["access_token"]
```
#### Set access token
```python
client.auth.set_access_token(access_token)
```
## Requirements
- requests
## Contributing
We are always grateful for any kind of contribution including but not limited to bug reports, code enhancements, bug fixes, and even functionality suggestions.
#### You can report any bug you find or suggest new functionality with a new [issue](https://github.com/GearPlug/tiktok-marketing-python/issues).
#### If you want to add yourself some functionality to the wrapper:
1. Fork it ( https://github.com/GearPlug/tiktok-marketing-python )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Adds my new feature')
- To add new modules create a file `.py`
- create a class that extends `module.py::Module`
- Import and add the new module to `api.py::TikTokClient` and remove the todo comment
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request