IgniterMedia.com & GracewayMedia.com are OAuth 2.0 providers. Use of the V2 API requires the client to have pre-registered an application to allow user authentication & authorization.
To describe the function of consuming our OAuth 2.0 API, we'll use this diagram taken from RFC 6749, the official word on OAuth.
In step A, we ask the authorization server to grant authorization to our client. The authorization server should prompt the user for recognition of this application; if granted, then access and refresh tokens are issued. The access token has a time-to-live value associated with it.
When downloading protected resources (steps C and D), the access token must be presented. If an expired or invalid token is presented, it will be rejected; the client should then attempt a refresh (step G.) If the refresh fails, client should start over from step A.
Creating an Application
To get started, please reqeuest that an OAuth application be created for the sites on which you want to access protected resources. You will have to provide the callback URL your application will use to handle an access grant. When the application is created, you will then receive two magic numbers: a client_id
and a client_secret
. These two numbers will be used in your app, so store them appropriately.