You can view the Sendbird Server API docs here: https://sendbird.gitbooks.io/sendbird-server-api/content/en/
- Create a Sendbird Application at https://dashboard.sendbird.com/ to get an APP_ID and an API_TOKEN
- Run
go get github.com/ippy04/sendbird
import "github.com/ippy04/sendbird"
sb := sendbird.NewClient(SENDBIRD_APP_ID, SENDBIRD_API_TOKEN, nil)
To create a new user:
import "github.com/ippy04/sendbird"
func createUser() {
sb := sendbird.NewClient(SENDBIRD_APP_ID, SENDBIRD_API_TOKEN, nil)
params := sendbird.UserRequest{
Id: "123456",
Nickname: "nickname",
ImageUrl: "http://sendbird.com/picture_url",
IssueAccessToken: true,
}
user, _, err := sb.User.Create(params)
if err != nil {
log.Fatal("User not created")
}
}
See tests for more examples