# FreeHelpDeskApi.AuthenticationApi

All URIs are relative to *https://api.freehelpdesk.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getBearerAuthToken**](AuthenticationApi.md#getBearerAuthToken) | **POST** /token | Authenticates provided credentials and returns an access token


<a name="getBearerAuthToken"></a>
# **getBearerAuthToken**
> InlineResponse200 getBearerAuthToken(grantType, opts)

Authenticates provided credentials and returns an access token

### Example
```javascript
var FreeHelpDeskApi = require('free_help_desk_api');

var apiInstance = new FreeHelpDeskApi.AuthenticationApi();

var grantType = "password"; // String | authorization grant type. (password/refresh_token)

var opts = { 
  'username': "username_example", // String | Valid FreeHelpDesk username
  'password': "password_example", // String | Valid FreeHelpDesk password
  'refreshToken': "refreshToken_example", // String | Valid refresh token
  'type': "type_example" // String | Login type (optional)
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **grantType** | **String**| authorization grant type. (password/refresh_token) | [default to password]
 **username** | **String**| Valid FreeHelpDesk username | [optional] 
 **password** | **String**| Valid FreeHelpDesk password | [optional] 
 **refreshToken** | **String**| Valid refresh token | [optional] 
 **type** | **String**| Login type (optional) | [optional] 

### Return type

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

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

