# Sign In With Password

Source: https://docs.pitchpointsolutions.com/api/authentication/signinwithpassword/

**Stable**

Obtain an access token by signing in with your username and password.

```shell
curl -X POST https://api.pointservices.com/user-management-services-ws/oauth2/002/signInWithPassword \
-H "Content-Type: application/json" \
-d '{
  "username": "customerUsername",
  "password": "customerPassword",
  "useralias": "optionalUserAlias"
}'
```

#### Header Properties

| Property | Value            | Required? |
|----------|------------------|-----------|
| Content-Type | application/json | true      |

#### Request Data Properties

| Property  | Description                                                                                                                                                                                         | Type   | Required |
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|----------|
| username  | Your username.                                                                                                                                                                                      | string | yes      |
| password  | Your password.                                                                                                                                                                                      | string | yes      |
| useralias | Use the `useralias` parameter to sign in as another user within your organization. This is disabled by default; contact your Pitchpoint Account Representative to have it enabled for your account. | string | no       |

### Responses

**200**

| Property | Description | Type   | Default |
|----------|-------------|--------|---------|
| access_token | Used for authenticated requests to the Webhooks API, in the `Authorization` header as `Bearer <token>`. | string |         |
| refresh_token | Used to obtain a new access token once the current one expires. | string |         |
| scope         | The scope of the token                                     | string |         |
| token_type    | The token type                           | string | Bearer  |
| expires_in | The time in seconds until the access token expires. | number | 3600    |

Example:
```json
{
  "access_token": "eyJraWQiOiIxMjM0NSIsInR5cCI6IkpXVCIsImFsZyI6IlJTMjU2In0.eyJhdWQiOiJ0ZXN0LXRlbmFudCIsInN1YiI6InhwcHN8MTIyMyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJ1c2VyX2lkIjoiMTIyMyIsImF1dGhfdGltZSI6MTcwODcxNTYwMiwiaXNzIjoiaHR0cHM6XC9cL3NlY3VyZXRva2VuLmdvb2dsZS5jb21cL3Rlc3QtdGVuYW50IiwiZXhwIjoxNzA4NzE5LCJpYXQiOjE3MDg3MTUsImVtYWlsIjoidGVzdHVzZXJAdGVuYW50LmNvbSJ9.dGVzdA==",
  "refresh_token": "AMf-vBxITbnfBBMJpPXMvop1qa1cMaUuqAKX_y1hYsmcgVtzhx7Al_9mWD",
  "scope": "policy",
  "token_type": "Bearer",
  "expires_in": 3600
}
```

**400**

**403**

| Property | Description                           | Type | Default |
|----------|---------------------------------------|------|---------|
| error    | Error code                            | string | |
| error_description  | String description of what went wrong | string | |

Example:
```json
{
    "error_description": "Invalid username / password combination",
    "error": "access_denied"
}
```
