Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

How to Setup Snykio Endpoint

Jesse Houwing edited this page Nov 29, 2016 · 2 revisions

When you want to use the Protect and Monitor features of Snyk, you need to provide a API Token. To store your API Token securely, I recommend you setup a Service Endpoint in your Project Collection on Visual Studio Team Services. The endpoint will store your API Token securely and will allow you to easily re-use the same access token for multiple build workflows.

1. Find your API token.

Navigate to your profile on snyk.io, your API Token is shown there.

2. Setup your Snyk.io endpoint

Navigate to the Services page for the VSTS project that will host your build or release definition. (You will need to create a service endpoint for each project on VSTS if you're using multiple). (https://{YourAccount}.visualstudio.com/DefaultCollection/{YourProject}/_admin/_services). You can find this page by navigating to your VSTS Project home page and then clicking the little cog-wheel in the upper right corner. Then navigate to the Services tab.

You can also navigate to the Services page by clicking the manage link next to the Service endpoint field in the Build task's configuration.

Click + New Service Endpoint and select the Snyk.io API Token option. In the dialog that pops up enter a name for your endpoint (I tend to use my Snyk.io Account name) and enter the API token in the corresponding textbox.

Save your endpoint so you can use it from the Snyk task.