# GetServiceTokenAsync(CancellationToken)

> Get the service authentication token used for the Service Gateway apis.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static Task<string> GetServiceTokenAsync(CancellationToken cancellationToken = default)
```

### Parameters

**** (\[CancellationToken]\(https\://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken)):&#x20;

### Returns

| Type                                                                                | Description |
| ----------------------------------------------------------------------------------- | ----------- |
| [Task\<string>](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task) |             |
