From 41f470d2aad10558be7e458c666cc1666a7537d6 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 13 Nov 2020 12:55:07 +0100 Subject: [PATCH] Add read to scopes in obtain-token example. Without that, we cannot very our credentials. Mastodon needs read::accounts, Pleroma needs read. --- examples/example08_obtain_token.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/example08_obtain_token.cpp b/examples/example08_obtain_token.cpp index 82ac39a..3f9cca0 100644 --- a/examples/example08_obtain_token.cpp +++ b/examples/example08_obtain_token.cpp @@ -57,7 +57,9 @@ int main(int argc, char *argv[]) // Create an “Application” (/api/v1/apps), // and get URI for the authorization code (/oauth/authorize). - auto answer{token.step_1("Testclient", "read:blocks read:mutes", + // NOTE: Mastodon only needs read:accounts for verify_credentials but + // Pleroma needs the full read scope. + auto answer{token.step_1("Testclient", "read write:favourites", "https://example.com/")}; if (!answer) {