clj-instagram.oauth

Functions for creating an authorization URL and exchanging code received from Instagram for an access token.

For more details refer to official documentation about authentication:
https://www.instagram.com/developer/authentication/

authorization-url

(authorization-url client-id redirect-uri)(authorization-url client-id redirect-uri {:keys [state scope]})
Creates an authorization URL that will allow user to log in and grant your application access to user's Instagram
data.

Parameters:
  client-id    - client id
  redirect-uri - location of your application user will be redirected to
  state        - any server-specific state you want to carry through (optional)
  scope        - request additional permissions outside the "basic" scope (optional)

request-access-token

(request-access-token client-id client-secret redirect-uri code)(request-access-token client-id client-secret redirect-uri code opts)
Exchange code received from Instagram for an access token.

Parameters:
  client-id     - client ID
  client-secret - client secret
  redirect-uri  - the redirect URI used in the authorization request
  code          - the exact code received during the authorization step
  opts          - HTTP client options (optional)