File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,18 @@ import SendbirdPlatformSdk from 'sendbird-platform-sdk';
1616const userId = " 1234" ;
1717const name = " bob" ;
1818const profileUrl = " https://picsum.photos/200" ;
19+ const apiToken = " YOUR_API_TOKEN" ;
20+ const appId = " YOUR_APP_ID" ;
1921
2022const opts = {
21- ' apiToken' : ' YOUR_MASTER_API_KEY' ,
2223 ' createUserData' : new SendbirdPlatformSdk.CreateUserData (userId, name, profileUrl),
2324};
2425
2526async function createUser () {
2627 const userApiInstance = new SendbirdPlatformSdk.UserApi ();
27- userApiInstance .apiClient .basePath = ` https://api-${ " YOUR_APP_ID " } .sendbird.com` ;
28+ userApiInstance .apiClient .basePath = ` https://api-${ appId } .sendbird.com` ;
2829 try {
29- const data = await userApiInstance .createUser (opts);
30+ const data = await userApiInstance .createUser (apiToken, opts);
3031 console .log (data);
3132 } catch (e) {
3233 console .log (e);
You can’t perform that action at this time.
0 commit comments