Skip to content

Authentication

Some LAPIS instances require authentication to access their data. If an instance is configured with authentication, you need to include a valid access token in your requests.

Try accessing any endpoint without authentication:

Terminal window
curl https://lapis.cov-spectrum.org/open/v2/sample/info -v

If authentication is required, you’ll receive a 401 Unauthorized response and the output will contain something like

> ...
< HTTP/1.1 401
< ...

If the instance is open (no authentication), you’ll receive the normal response data.

Contact the LAPIS instance administrator to learn how to obtain an access token. The method depends on the identity provider configured for that instance. Common methods include:

  • Username/password - Exchange credentials for a token
  • Client credentials - Use a client ID and secret
  • OAuth 2.0 flows - Authorization code, device flow, etc.

To make authenticated requests to LAPIS, include the access token in the Authorization header using the Bearer scheme:

Terminal window
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" https://lapis.cov-spectrum.org/open/v2/sample/aggregated