Sample HTTPS Call (Authorization Code grant type)https://identity.reckon.com/connect/authorize?client_id=<<CLIENTID>>&response_type=c... URL>>&state=random_state&nonce=random_nonce Note: If your application is a desktop application, you will need to build a web browser pop up window or something of that ilk to deal with this. You need to be able to present a website loaded from our server for the user to login with. If this is a major problem please contact reckonapi@reckon.com This is the call that you will trigger when the user requests to connect to Reckon Accounts Hosted or Reckon One. You may have an administration page where people do this but you will need to trigger this process somehow to get an authorisation key returned. HTTPS Call Components Explainedauthorize?client_id=<<CLIENT ID>>This is where you set your client ID. This client ID is provided to you by Reckon once you have provided a Callback URL. If you do not have this Client ID please email reckonapi@reckon.com &response_type=codeThis is where you set the response that you would like a code returned to you. This code is then used in a further call to obtain your access token and refresh token. scope=read+write+offline_accessThis is where you set the permissions that you wish to have with the service. When the user is authorising your application they will be informed of what permissions you are requesting. In the case of Reckon Accounts Hosted and Reckon One you should always be asking for read, write and offline access. Offline access allows you to use refresh tokens with the API. redirect_uri=http://127.0.0.1/index.htmlThis is where the redirect URI (Callback URL) is set. This URL must match the URL you gave to Reckon as the callback URL otherwise the security systems will block the request. Obtaining a access token and refresh tokenOnce you have received a code from the identity server, this code can be used to obtain a access token and refresh token. To do that requires a second call to the identity server via HTTPS Typical token request callThe typical URL call is the following: URL https://identity.reckon.com/connect/token<br>TypePOSTBodygrant_type=authorization_code&code=<<CODE>>&redirect_uri=<<REDIRECT URI>>HeadersContent-Type = application/x-www-form-urlencodedAuthorization: Basic <<CLIENTID:CLIENTSECRET ENCODED IN BASE64>>After this call is successfully sent, the response will include an access token and refresh token. Once you have obtained this you can use the refresh token to obtain new access tokens without the user having to input their credentials again. For example if your client id is 1234 and your secret is 5678 the correct authorization header is Authorization: Basic <<1234:5678 ENCODED IN BASE64>> Typical refresh token request callTo use the refresh token to obtain a new access token, you need to send another call to the service. The typical call is as follows: URLhttps://identity.reckon.com/connect/token<br>TypePOSTBodygrant_type=refresh_token&refresh_token=<<REFRESH TOKEN>>&redirect_uri=<<REDIRECT URI>>After this call is successfully sent the response will again include a access token (which is used to access the API) and a refresh token which can be used in the future to obtain another access token. The refresh token should always be recorded to ensure that you can get a updated token without the users interaction.
https://identity.reckon.com/connect/token<br>