## Example of Explicit Authentication:

Explicit authentication is relatively straightforward with Stack.PY. Assuming you have already [registered your application](http://stackapps.com/apps/oauth/register), the instructions look something like this:

1. Visit your [application's page](http://stackapps.com/questions/3841/how-to-access-my-app-info) to obtain the following information:

   - key
   - client ID
   - client secret
   <br><br>

1. Provide Stack.PY with the above information:

        from stackpy import API
        
        # Fill in the strings with the appropriate values:
        API.key, API.client_id, API.client_secret = "", "", ""

1. The `API.begin_explicit()` call consists of the following parameters:

   - a string consisting of the required privileges separated by commas
   - the URI to redirect the user to when the authorization completes
   - an optional string value to be returned with the access token when authorization completes
   <br><br>

   Example:

        redirect_uri = API.begin_explicit('read_inbox,no_expiry',
                                          'http://example.com/done')

   The return value of the function is the URL that you will need to redirect the user to. That page will allow the user to authorize your application.

1. The `API.complete_explicit()` call consists of the following parameters:

   - the value of the GET parameter `code`
   - the URI you provided to `begin_explicit()` above
   <br><br>

   Example:

        access_token = API.complete_explicit(request.GET['code'],
                                             'http://example.com/done')

   The return value is the access token for the user.