deepgram / deepgram-go-sdk

Go SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
31 stars 27 forks source link

When creating an API key via the REST API, the key isn't returned #202

Closed sethhitch closed 5 months ago

sethhitch commented 5 months ago

What is the current behavior?

The CreateKey function in pkg/api/manage/v1 can be used to create new API keys, but the APIKey type that it returns doesn't contain the actual key:

type APIKey struct {
    APIKeyID string   `json:"api_key_id,omitempty"`
    Comment  string   `json:"comment,omitempty"`
    Scopes   []string `json:"scopes,omitempty"`
    Created  string   `json:"created,omitempty"`
}

Expected behavior

I'm trying to use your SDK to create temporary keys for client-side transcription as described here: https://deepgram.com/learn/protecting-api-key

However, I can't do that because the actual key isn't returned!

Please tell us about your environment

I'm using version 1.2.1 of the SDK.

Other information

dvonthenen commented 5 months ago

Hi @sethhitch

Yea, we discovererd this in Python through another issue but I forgot to check the Go at the time. Will have an update for this. Thanks for finding this!

dvonthenen commented 5 months ago

This should be available in this release: https://github.com/deepgram/deepgram-go-sdk/releases/tag/v1.2.2

Let me know if you run into any issues.

sethhitch commented 5 months ago

Works great, thanks for turning that around so quickly!