diff options
author | tastytea | 2020-11-13 12:55:07 +0100 |
---|---|---|
committer | tastytea | 2020-11-13 13:02:52 +0100 |
commit | 41f470d2aad10558be7e458c666cc1666a7537d6 (patch) | |
tree | 1c34a5b45e07db2fddd4eab3968ac34c458cb316 | |
parent | e563731efebad63c1478e6368557a7f9c37803fb (diff) | |
download | mastodonpp-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.cpp | 4 |
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) { |