oauth Authorization Code Grant


Example

Step 1

GET /authorize?response_type=code&client_id=[APP_KEY]&state=[RANDOM_STRING]
    &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb
    &scope=[OPTIONAL_SCOPES] HTTP/1.1
Host: server.example.com

Step 2

POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&code=[CODE_FROM_STEP1]
    &client_id=[APP_KEY]&client_secret=[APP_SECRET]
    &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb

Source