mastodon-archive
mastodon-archive copied to clipboard
Invalid scope when re-authorizing for expire
I'm trying to expire my old toots from mastodon.technology with the following command:
mastodon-archive expire --older-than 4 [email protected] --confirmed
and when I follow the URL for authorization:
https://mastodon.technology/oauth/authorize?client_id=CENSORED&response_type=code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=read+write
the instance shows me a message saying "The requested scope is invalid, unknown, or malformed." Changing the scope to just "write" results in the same error, though changing it to "read" makes it work.
It may be related to https://github.com/tootsuite/mastodon/issues/183 but I don't understand what the solution was.
You think that the scopes need to be the same when registering the client and when authorizing the client? If so, delete the two *.secret
files before expiring toots. If that works, then perhaps that's what we should do: re-register the application before attempting to authorize.
That worked, thank you!
Hello,
I got the same issue, even after deleting the two *.secret file.
I also tried to delete authorization and authorize mastodon-archive again, but with no success.
Do not hesitate if you want more information.
I was trying to expire all toots of [email protected].
After you delete the .secret files (and possibly also the authorization), be sure to authorize with the read+write scope, not the read scope again.
Hello again,
To give more informations : First I made an archive with --with-mentions option. When deleting *.secret files, I had an invalid scope message.
I removed my archives and made a new one without --with-mentions option.
I delete the .secret file and tried to expire toots and favourites -> that went fine.
I don't know if it will help. But thank you for your help!
Looks like we really need to do this. Or, alternatively, we could always use read- and write scope. Perhaps that would be simpler?