Skip to content

Latest commit

 

History

History
150 lines (93 loc) · 5.63 KB

File metadata and controls

150 lines (93 loc) · 5.63 KB

Auth

(Auth)

Overview

REST APIs for managing Authentication

Available Operations

GetAccessToken

Get or refresh an access token for the current workspace.

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK();

GetAccessTokenRequest req = new GetAccessTokenRequest() {
    WorkspaceId = "<value>",
};

var res = await sdk.Auth.GetAccessTokenAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetAccessTokenRequest ✔️ The request object to use for the request.

Response

GetAccessTokenResponse

Errors

Error Object Status Code Content Type
SpeakeasySDK.Models.Errors.SDKException 4xx-5xx /

GetUser

Get information about the current user.

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

var res = await sdk.Auth.GetUserAsync();

// handle response

Response

GetUserResponse

Errors

Error Object Status Code Content Type
SpeakeasySDK.Models.Errors.SDKException 4xx-5xx /

GetWorkspaceAccess

Checks if generation is permitted for a particular run of the CLI

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

GetWorkspaceAccessRequest req = new GetWorkspaceAccessRequest() {};

var res = await sdk.Auth.GetWorkspaceAccessAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetWorkspaceAccessRequest ✔️ The request object to use for the request.

Response

GetWorkspaceAccessResponse

Errors

Error Object Status Code Content Type
SpeakeasySDK.Models.Errors.SDKException 4xx-5xx /

ValidateApiKey

Validate the current api key.

Example Usage

using SpeakeasySDK;
using SpeakeasySDK.Models.Shared;

var sdk = new SDK(security: new Security() {
    APIKey = "<YOUR_API_KEY_HERE>",
});

var res = await sdk.Auth.ValidateApiKeyAsync();

// handle response

Response

ValidateApiKeyResponse

Errors

Error Object Status Code Content Type
SpeakeasySDK.Models.Errors.SDKException 4xx-5xx /