mastodon-archive icon indicating copy to clipboard operation
mastodon-archive copied to clipboard

Invalid scope when re-authorizing for expire

Open deshipu opened this issue 6 years ago • 7 comments

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.

deshipu avatar Aug 24 '18 16:08 deshipu

It may be related to https://github.com/tootsuite/mastodon/issues/183 but I don't understand what the solution was.

deshipu avatar Aug 24 '18 16:08 deshipu

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.

kensanata avatar Aug 27 '18 08:08 kensanata

That worked, thank you!

deshipu avatar Aug 27 '18 14:08 deshipu

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].

Xakan avatar Aug 28 '18 15:08 Xakan

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.

deshipu avatar Aug 28 '18 15:08 deshipu

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!

Xakan avatar Aug 28 '18 16:08 Xakan

Looks like we really need to do this. Or, alternatively, we could always use read- and write scope. Perhaps that would be simpler?

kensanata avatar Apr 07 '19 11:04 kensanata