messagix-configs: failed to setup configs (&{%!e(string=failed to sync data via graphql for databases: 1, 2, 95: &{%!e(string=failed to unmarshal LSRequest response bytes into LSPlatformGraphQLLightspeedRequestForIGDQuery struct: &{%!e(string=invalid character '<' looking for beginning of value) %!e(int64=1)})})})
Opened this issue · 0 comments
wind-hx commented
Initialize the instagram client through cookies
cookieStr := `{"SessionId":"65151172087%3AIgX5hHg6Wd24QA%3A15%3AAYebn4DASjy8T_9IfCl7HAtJ-GnrOLI6h7pzSARh9Q","CsrfToken":"dNTzXnXR6QEI7j55wXlr3HElzcDaJGPG","MachineId":"ZeV90AAEAAED2knVkosrmZcV6FBd","IgDeviceId":"1A27CCA4-48C6-42B0-9E81-0C82D07424D8","Rur":"\"NAO\\05465151172087\\0541741074774:01f78e59c4a33e2b426d7f8c153aa0910f093f96b13fda676a9e6fa2dfb3abbd4be895dd\"","UserId":"65151172087","IgWWWClaim":"hmac.AR1eM9bzjmDqN6SeGKsFweksfrROuqSbSYmMzgWkzkYBx_GF"}`
cookie, err := cookies.NewCookiesFromJson(cookieStr, types.Instagram)
if err != nil {
log.Println(err)
}
cli, err := messagix.NewClient(types.Instagram, cookie, debug.NewLogger(), "")
if err != nil {
log.Println(err)
}
cli.Connect()
account, _ := cli.GetCurrentAccount()
log.Println(account)