Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 3.58 KB

README.md

File metadata and controls

58 lines (45 loc) · 3.58 KB

Login

(Login)

Available Operations

GetUnifiedIntegrationLogin

Returns an authentication URL for the specified integration. Once a successful authentication occurs, the name and email are returned inside a jwt parameter, which is a JSON web token that is base-64 encoded.

Example Usage

package main

import(
	"os"
	unifiedgosdk "github.com/unified-to/unified-go-sdk"
	"github.com/unified-to/unified-go-sdk/pkg/models/operations"
	"context"
	"log"
)

func main() {
    s := unifiedgosdk.New(
        unifiedgosdk.WithSecurity(os.Getenv("JWT")),
    )
    request := operations.GetUnifiedIntegrationLoginRequest{
        IntegrationType: "<value>",
        WorkspaceID: "<value>",
    }
    ctx := context.Background()
    res, err := s.Login.GetUnifiedIntegrationLogin(ctx, request)
    if err != nil {
        log.Fatal(err)
    }
    if res.Res != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.GetUnifiedIntegrationLoginResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /