From what I understand, there are to ways to obtain the authorization code to get an access token:
authorization code
access token