All versions of this documentation
X
 

Getting started: Use the API key

Let's see how to use an API key to access a given resource with an example. We will try to access the GET /graph/schema/nodeTypes/properties API. To do so, we require an API key that has the schema access-right.

For convenience we will use the API key 892d5941dc3da9eeb92f32d71e5e5dc5 that already can act on behalf of the user student@linkurio.us.

To authenticate via API key, you need to use HTTP basic access authentication. So, for example, if your application wants to act on behalf of the user student@linkurio.us and it uses the API key 892d5941dc3da9eeb92f32d71e5e5dc5:

  • Add the Authentication HTTP header field to each HTTP request you want to be authenticated
  • As a value of the Authentication field, you need to provide a string composed by:
    • Basic <encodeBase64('<e-mail>:<API_key>')>

In alternative, many libraries, like request, offers facilities to use HTTP basic access authentication: