# Zaun.AuthApi

All URIs are relative to *https://virtserver.swaggerhub.com/kata.ai/zaun-q2/1.0.0*

Method | HTTP request | Description
------------- | ------------- | -------------
[**cliLoginPost**](AuthApi.md#cliLoginPost) | **POST** /cli-login | Login for KataCLI, bypass the captcha verification
[**forgotPost**](AuthApi.md#forgotPost) | **POST** /forgot | Forgot password
[**impersonatePost**](AuthApi.md#impersonatePost) | **POST** /impersonate | impersonate login
[**loginPost**](AuthApi.md#loginPost) | **POST** /login | Login
[**tokensPost**](AuthApi.md#tokensPost) | **POST** /tokens | Create token
[**tokensTokenIdGet**](AuthApi.md#tokensTokenIdGet) | **GET** /tokens/{tokenId} | Read token by ID


<a name="cliLoginPost"></a>
# **cliLoginPost**
> Token cliLoginPost(body)

Login for KataCLI, bypass the captcha verification

### Example
```javascript
var Zaun = require('zaun');

var apiInstance = new Zaun.AuthApi();

var body = new Zaun.CLILogin(); // CLILogin | CLI Login payload


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.cliLoginPost(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**CLILogin**](CLILogin.md)| CLI Login payload | 

### Return type

[**Token**](Token.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="forgotPost"></a>
# **forgotPost**
> InlineResponse200 forgotPost(body)

Forgot password

### Example
```javascript
var Zaun = require('zaun');

var apiInstance = new Zaun.AuthApi();

var body = new Zaun.Body(); // Body | body objects


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.forgotPost(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Body**](Body.md)| body objects | 

### Return type

[**InlineResponse200**](InlineResponse200.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="impersonatePost"></a>
# **impersonatePost**
> TokenImpersonate impersonatePost(body)

impersonate login

### Example
```javascript
var Zaun = require('zaun');

var apiInstance = new Zaun.AuthApi();

var body = new Zaun.LoginImpersonate(); // LoginImpersonate | impersonate login


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.impersonatePost(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**LoginImpersonate**](LoginImpersonate.md)| impersonate login | 

### Return type

[**TokenImpersonate**](TokenImpersonate.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="loginPost"></a>
# **loginPost**
> Token loginPost(body)

Login

### Example
```javascript
var Zaun = require('zaun');

var apiInstance = new Zaun.AuthApi();

var body = new Zaun.Login(); // Login | Login


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.loginPost(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Login**](Login.md)| Login | 

### Return type

[**Token**](Token.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="tokensPost"></a>
# **tokensPost**
> Token tokensPost(body)

Create token

### Example
```javascript
var Zaun = require('zaun');
var defaultClient = Zaun.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new Zaun.AuthApi();

var body = new Zaun.Token(); // Token | Token object


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.tokensPost(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Token**](Token.md)| Token object | 

### Return type

[**Token**](Token.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="tokensTokenIdGet"></a>
# **tokensTokenIdGet**
> Token tokensTokenIdGet(tokenId)

Read token by ID

### Example
```javascript
var Zaun = require('zaun');
var defaultClient = Zaun.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new Zaun.AuthApi();

var tokenId = "tokenId_example"; // String | Token ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.tokensTokenIdGet(tokenId, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **tokenId** | **String**| Token ID | 

### Return type

[**Token**](Token.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

