Loading…
📚
apifm
Frontend PaaS & AI Dev Platform
Homepage
Open Source
SDK
Cases
Contact
Backend management
User authorization registration and management
User authorization registration and management
Help documentation
Update anytime
Table of contents on this page
Pop up user authorization information
tt.login interface to obtain code
tt.getUserInfo interface obtains user information
Cloud development completed registration
View and manage users in the cloud backend
# Pop up user authorization information Check out Toutiao API interface documentation [https://microapp.bytedance.com/dev/cn/mini-app/develop/open-capacity/log-in/tt.login](https://microapp.bytedance.com/dev/cn/mini-app/develop/open-capacity/log-in/tt.login) Use the following 2 interfaces: ## tt.login interface to obtain code **Sample code:** ```javascript tt.login({ success(res) { console.log(`Login call successful ${res.code} ${res.anonymousCode}`); }, fail(res) { console.log(`login call failed`); } }); ``` ## tt.getUserInfo interface to obtain user information **Sample code:** ```javascript tt.getUserInfo({ success(res) { console.log(`getUserInfo called successfully ${res.userInfo}`); }, fail(res) { console.log(`getUserInfo call failed`); } }); ``` ## # Cloud development completed registration ```javascript TTAPI.register_tt({ code: code, avatarUrl: res.userInfo.avatarUrl, nickName: res.userInfo.nickName, province: res.userInfo.province, city: res.userInfo.city, }).then(apiResult => { console.log(apiResult); //Register interface return data }) ``` # View and manage users in the cloud background 