# CymbioApi.UserApi

All URIs are relative to *http://api1.cym.bio/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**authenticateUser**](UserApi.md#authenticateUser) | **GET** /users/authenticate | Returns the user token
[**postUser**](UserApi.md#postUser) | **POST** /users | Create user
[**sendResetPassword**](UserApi.md#sendResetPassword) | **GET** /users/sendResetPassword | Sends the user a password reset email


<a name="authenticateUser"></a>
# **authenticateUser**
> InlineResponse2008 authenticateUser(email, password, opts)

Returns the user token

Returns the user token given an email and a password

### Example
```javascript
var CymbioApi = require('cymbio_api');

var apiInstance = new CymbioApi.UserApi();

var email = "email_example"; // String | The user email

var password = "password_example"; // String | The user password

var opts = { 
  'storeId': "storeId_example" // String | Login to a specific store, will send a store token instead of user token.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **email** | **String**| The user email | 
 **password** | **String**| The user password | 
 **storeId** | **String**| Login to a specific store, will send a store token instead of user token. | [optional] 

### Return type

[**InlineResponse2008**](InlineResponse2008.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="postUser"></a>
# **postUser**
> InlineResponse2008 postUser(user)

Create user

Create a new user using email and password

### Example
```javascript
var CymbioApi = require('cymbio_api');

var apiInstance = new CymbioApi.UserApi();

var user = new CymbioApi.NewUser(); // NewUser | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **user** | [**NewUser**](NewUser.md)|  | 

### Return type

[**InlineResponse2008**](InlineResponse2008.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="sendResetPassword"></a>
# **sendResetPassword**
> InlineResponse2001 sendResetPassword(email)

Sends the user a password reset email

Takes an email address and sends the user (if exists) a password reset email.

### Example
```javascript
var CymbioApi = require('cymbio_api');

var apiInstance = new CymbioApi.UserApi();

var email = "email_example"; // String | The user email


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **email** | **String**| The user email | 

### Return type

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

No authorization required

### HTTP request headers

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

