# API Connection Sample

To connect to the API through the API documentation interface. You may at first copy the REST API key token from the  [Developer](https://docs.ngsurvey.com/personal-account/developer) tab.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MC6bhhX0E4_0Eeg_Aiu%2F-MC6bpSBDmevYmwDYWkP%2Fimage.png?alt=media\&token=f60faf1f-417a-4608-b0d5-5c0d0d59e2d9)

Once this is done you may open in your browser your REST API endpoint and authorize your API using the API key.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MC6a8alXFEsc0ujmtKp%2F-MC6bXzt0Us6qMrD1cmC%2Fimage.png?alt=media\&token=53e61850-ad4c-49a2-821a-a459ec1f22d0)

{% hint style="warning" %}
Make sure to set the **Bearer** keyword before your API key.
{% endhint %}

Now that you have authorized the API you may try it out using the web based interface, you may for example start by fetching all your surveys using following endpoint.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MC6bhhX0E4_0Eeg_Aiu%2F-MC6c8Ldh06hbah8QuCR%2Fimage.png?alt=media\&token=3ad93ca8-e346-485e-8efc-2a7f1abae0c6)
