summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortastytea2020-11-13 12:55:07 +0100
committertastytea2020-11-13 13:02:52 +0100
commit41f470d2aad10558be7e458c666cc1666a7537d6 (patch)
tree1c34a5b45e07db2fddd4eab3968ac34c458cb316
parente563731efebad63c1478e6368557a7f9c37803fb (diff)
downloadmastodonpp-41f470d2aad10558be7e458c666cc1666a7537d6.tar
mastodonpp-41f470d2aad10558be7e458c666cc1666a7537d6.tar.gz
mastodonpp-41f470d2aad10558be7e458c666cc1666a7537d6.zip
Add read to scopes in obtain-token example.
Without that, we cannot very our credentials. Mastodon needs read::accounts, Pleroma needs read.
-rw-r--r--examples/example08_obtain_token.cpp4
1 files changed, 3 insertions, 1 deletions
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)
{