Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.97 KB

README.md

File metadata and controls

55 lines (39 loc) · 1.97 KB

APIKey

(APIKey)

Available Operations

GetAPIKey

Test your API key

Example Usage

package main

import(
	loopsgo "github.com/speakeasy-sdks/loops-go"
	"context"
	"log"
)

func main() {
    s := loopsgo.New(
        loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
    )

    ctx := context.Background()
    res, err := s.APIKey.GetAPIKey(ctx)
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
opts []operations.Option The options for this request.

Response

*operations.GetAPIKeyResponse, error

Error Object Status Code Content Type
sdkerrors.GetAPIKeyResponseBody 401 application/json
sdkerrors.SDKError 4xx-5xx /