Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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)})})}) #2

Open
wind-hx opened this issue Mar 4, 2024 · 0 comments

Comments

@wind-hx
Copy link

wind-hx commented Mar 4, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant