(Authentication)
The authentication endpoints.
- Authenticate - Authenticate with the API by providing a username and password.
Authenticate with the API by providing a username and password.
package main
import(
"context"
"log"
templatespeakeasybar "github.com/speakeasy-sdks/template-speakeasy-bar"
"github.com/speakeasy-sdks/template-speakeasy-bar/pkg/models/shared"
"github.com/speakeasy-sdks/template-speakeasy-bar/pkg/models/operations"
)
func main() {
s := templatespeakeasybar.New(
templatespeakeasybar.WithSecurity(""),
)
ctx := context.Background()
res, err := s.Authentication.Authenticate(ctx, operations.AuthenticateRequestBody{})
if err != nil {
log.Fatal(err)
}
if res.Authenticate200ApplicationJSONObject != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.AuthenticateRequestBody | ✔️ | The request object to use for the request. |