SetAccessToken (v1/types-client.go)

deepgram-go-sdk · pkg/client/interfaces/v1/types-client.go · go · MIT
voice, Voice / Speech

Thread‑safe client options for setting access token, API key, and retrieving auth token.

// Source: https://github.com/deepgram/deepgram-go-sdk | License: MIT | Copyright 2021 Deepgram Devs
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright 2024 Deepgram SDK contributors. All Rights Reserved.
// Use of this source code is governed by a MIT license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package interfacesv1

import (
	"net/http"
	"net/url"
	"sync"

	clientinterfaces "github.com/deepgram/deepgram-go-sdk/v3/pkg/client/interfaces/shared"
)

// ClientOptions defines any options for the client

type BaseClientOptions = clientinterfaces.ClientOptions

type ClientOptions struct {
	APIKey            string
	AccessToken       string                                // JWT access token for Bearer authentication
	Host              

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key