Skip to content

xujiamingtxwd123/douyin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

抖音开放平台API (In progress)

Go Report Card

Docs 文档

go.dev reference

Usage 示例

dy := douyin.New()
scopes := oauth.GetAllScope(),
cfg := &config.Config{
    ClientKey:    "your client key",
    ClientSecret: "your client secret",
    RedirectURL:  "your redirect url",
    Scopes:  scopes,
    Cache:   util.NewMemCache(),
}
openAPI := dy.GetOpenAPI()
oauth := openAPI.GetOauth()
url := oauth.GetRedirectURL("amor")

抖音授权流程

  1. 第三方发起抖音授权登录请求,抖音用户允许授权第三方应用后(扫码确认或账号密码授权登录),确认通过后,会重定向到第三方网站(回调接口)。并且附带授权临时票据(code)

说明:抖音开放平台现已开放WEB、Android、iOS和JS四种渠道的授权方式能力,您可以根据需要自行选择符合您需求的授权方法四种方式的区别详见“应用场景”,四种接入方式,详见各渠道接入说明

  1. 第三方通过code参数,以及ClientKey和ClientSecret等参数,通过API换取access_token

详细操作方法见下方:授权令牌接入说明

  1. 通过access_token进行接口调用,获取用户基本信息及其他操作等。可以根据您的需求,选择OpenAPi的接口接入。

Issue 如有问题,可以提issue或通过微信联系我

微信

About

抖音开放平台API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%