-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
bad authorization: 400 Bad Request: invalid_grant #154
Comments
Probably, your mastodon server stop to support grant_type=password. |
Ah, I've added some debug in |
Do you have a code example of using the |
I'm on my phone so I can't write a good example. But checkout how I do it in tut. Here's how I register a new account in my program. https://github.com/RasmusLindroth/tut/blob/2634818c0a1097da935d7137b3620249e679223b/auth/add.go To use the access token once you have generated it you'll just have to include it in your config like this.
|
That works @RasmusLindroth. However, the |
You just run conf := &mastodon.Config{
Server: acc.Server,
ClientID: acc.ClientID,
ClientSecret: acc.ClientSecret,
AccessToken: acc.AccessToken,
}
client := mastodon.NewClient(conf) Now you can use the client for your requests |
Wow, it's so easy. That works, thank you! |
The example on the main page fails. c := mastodon.NewClient(&mastodon.Config{ atleast when i tried. Need to add accesskey and remove the authenticate part. |
Here's what I thknk to be the reason for many Essentially is issue with documentation and with the implementation of the |
I know this has been raised before although I can't seem to work out what the issue is. I've tried registering the app in the web UI preferences and also with
[go-mastodon](https://github.com/mattn/go-mastodon)
and whatever I try I getbad authorization: 400 Bad Request: invalid_grant
in response.I've tried the following code (obviously with the correct values) and I can't get it to work, any ideas I could try?
Thanks!
The text was updated successfully, but these errors were encountered: