https://github.com/chanioxaris/tiktok-oauth2
Go package for TikTok OAuth 2.0 support
https://github.com/chanioxaris/tiktok-oauth2
oauth2 tiktok
Last synced: 14 days ago
JSON representation
Go package for TikTok OAuth 2.0 support
- Host: GitHub
- URL: https://github.com/chanioxaris/tiktok-oauth2
- Owner: chanioxaris
- License: mit
- Created: 2021-07-17T09:42:47.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-18T07:59:18.000Z (almost 4 years ago)
- Last Synced: 2025-02-13T06:17:24.134Z (5 months ago)
- Topics: oauth2, tiktok
- Language: Go
- Homepage:
- Size: 41 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tiktok-oauth2
[](https://raw.githubusercontent.com/chanioxaris/tiktok-oauth2/master/LICENSE)
[](https://pkg.go.dev/github.com/chanioxaris/tiktok-oauth2)
[](https://codecov.io/gh/chanioxaris/tiktok-oauth2)
[](https://goreportcard.com/report/github.com/chanioxaris/tiktok-oauth2)A package to add support for TikTok OAuth 2.0 on top of the Golang's package ([https://github.com/golang/oauth2](https://github.com/golang/oauth2))
You can find the official TikTok documentation [here](https://developers.tiktok.com/doc)
### Install
`$ go get github.com/chanioxaris/tiktok-oauth2`### Available functions
- `NewConfig()` Create a new TikTok oauth2 config
- `ConfigExchange()` Convert an oauth2 config into an oauth2 token
- `RefreshToken()` Refresh the access token
- `RevokeAccess()` Revoke the access token
- `RetrieveUserInfo()` Retrieve basic information of a TikTok user### Helper functions
- `OpenIDFromToken()` Retrieve the extra field `open_id` from an oauth2 token.
- `ScopeFromToken()` Retrieve the extra field `scope` from an oauth2 token.
- `RefreshExpiresInFromToken()` Retrieve the extra field `refresh_expires_in` from an oauth2 token.### License
tiktok-oauth2 is [MIT licensed](LICENSE).