# AsApiKey Method

## Overloads

| [AsApiKey(String)](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IQcsLocation.AsApiKey.htm#Qlik_Sense_JsonRpc_IQcsLocation_AsApiKey_System_String_) |  | Configure the location to use an API key for authentication. |
| --- | --- | --- |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IQcsLocation.AsApiKey.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.IQcsLocation.AsApiKey.htm)

## AsApiKey(String)

Configure the location to use an API key for authentication.

### Declaration

```

          void AsApiKey(string apiKey)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | apiKey | The API key |