Snyk App
Leen supports Snyk integrations via OAuth2 and API Keys for both Snyk US, Snyk US-2, and Snyk EU. To integrate with Snyk, users will have to authorize Leen’s Snyk app or provide a valid API key. This will allow Leen to access the appropriate Snyk resources in your account. When using OAuth2, Leen takes care of the code-flow and access token management, so you don’t have to worry about it.Onboarding
Follow the steps below to onboard a user to our Snyk Integration.Create Snyk Connection using OAuth flow
With your Leen API Key and your Customer’s Org ID, make an API request to create a new Snyk Connection.
More information can be found on the API Reference page.
The response will look like this:
Example POST body and response
Example POST body and response
Redirect User to Snyk
Redirect the user to the 
Once the user has authorized the app, they will be redirected to Leen on a successful authorization.
oauth2_authorize_url from the previous step in a new tab.
This will prompt the user to authorize Leen’s Snyk app to access their Snyk resources.

Pull Data
Now that the user has authorized the app, you can pull data from Snyk using the
connection_id from the first step.
More information can be found on the API Reference page.API Key Authentication
Navigate to Organization Settings in Snyk
In the Snyk organization you want to connect, go to Settings and click “Manage Service Accounts”.

Create an API Key for the Snyk Organization
Under Service Accounts, enter a name, select Org Admin as the role, and choose API Key (no expiry).
Click “Create service account”.

Repeat for each Snyk organization you want to include, or use a group-level service account if applicable.
Create Snyk Connection using API Key
With your Leen API Key and your Customer’s Org ID, make an API request to create a new Snyk Connection with the API token created in the previous step.
More information can be found on the API Reference page.
The response will look like this:
Example POST body and response
Example POST body and response
Pull Data
Now that the connection has been created, you can pull data from Snyk using the
connection_id from the previous step.
More information can be found on the API Reference page.