about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen <eugen@zeonfederated.com>2017-01-26 20:41:53 +0100
committerGitHub <noreply@github.com>2017-01-26 20:41:53 +0100
commit6ba302b725c53645bc20591c63fa21aa465dbcf0 (patch)
treed6b09fd18f4cbec7e1d814cfce4a019c9cb84801
parentf6a5977f0b2986b15ca8254123053e1a59647cd1 (diff)
parent12eddb5cbe4536f403657a91d3775240cdada5b9 (diff)
Merge pull request #550 from wchristian/oauth_docs2
document that /oauth/token does not always return json
-rw-r--r--docs/Using-the-API/Testing-with-cURL.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/Using-the-API/Testing-with-cURL.md b/docs/Using-the-API/Testing-with-cURL.md
index 977773a08..dc5f2022d 100644
--- a/docs/Using-the-API/Testing-with-cURL.md
+++ b/docs/Using-the-API/Testing-with-cURL.md
@@ -9,7 +9,9 @@ From these two, you will need to acquire an access token. It is possible to do u
 
     curl -X POST -d "client_id=CLIENT_ID_HERE&client_secret=CLIENT_SECRET_HERE&grant_type=password&username=YOUR_EMAIL&password=YOUR_PASSWORD" -Ss https://mastodon.social/oauth/token
 
-The response will be a JSON object containing the key `access_token`. Use that token in any API requests by setting a header like this:
+The `/oauth/token` path will attempt to login with the given credentials, and then retrieve the access token for the current user. If the login failed the response will be a 302 redirect to `/auth/sign_in`. Otherwise the response will be a JSON object containing the key `access_token`.
+
+Use that token in any API requests by setting a header like this:
 
     curl --header "Authorization: Bearer ACCESS_TOKEN_HERE" -sS https://mastodon.social/api/statuses/home