Get Authorization Code
The first step in getting access to data via Akoya is to send your user to an Akoya authorization URL. Akoya directs your user through the account login and account authorization process and on success, redirects them back to a URL you specify with an authorization code.
The request URL
Include the following parameters in your URL's path:
URL path parameter | Description |
|---|---|
Base URL | Sandbox authorization URL: https://sandbox-idp.ddp.akoya.com/auth |
connector | The Akoya identifier for the data provider. Your user logging in via Akoya takes this identifier and directs the user through the appropriate FI's login flow. For sandbox testing purposes, use mikomo |
client_id | Your application's client ID from Akoya. |
redirect_uri | The redirect URI that you registered with Akoya for that client ID. Akoya validates that the redirect URI exactly matches the one registered to prevent malicious redirects. |
response_type | The OAuth 2 grant type requested. Akoya only accepts code, indicating that the application expects to receive an authorization code if successful. |
scope | Space separated values to request levels of access. You need to provide the following: openid offline_access profile. |
state | Any random string generated by your application. Akoya includes this state value back to your application upon completion of the authorization request for you to validate to prevent CSRF attacks. Consider using a state value of at least 8 characters. The state value needs to be unique per auth code request. |
This is a browser redirect that returns an authorization code and not an API response.
Once your app receives the authorization code, you can present the code to Akoya in exchange for an ID token.
For more on the authorization request process and tokens used in the Akoya , see: "Token Overview."
Build your own URL
There are minor differences between sandbox and production authorization URLs, as detailed in the table:
Sandbox Parameter Values | Production Parameter Values |
|---|---|
https://sandbox-idp.ddp.akoya.com/auth? | https://idp.ddp.akoya.com/auth? |
connector=mikomo& | connector={providerId}& |
client_id={clientId}& | client_id={clientId}& |
response_type=code& | response_type=code& |
redirect_uri={client-redirect-URL}& | redirect_uri={client-redirect-URL}& |
scope=openid profile offline_access& | scope=openid profile offline_access& |
state={state} | state={state} |
Replace CLIENT_ID in the example and paste into a browser window.
Note: We use the sandbox default redirect URI in this example. If your app is using https://recipient.ddp.akoya.com/flow/callback you only need to replace your client id.