POST /api/authentication

determine if the user has correct credentials

Authentication Error Codes:

The following error codes may be returned as part of an authentication failure response:

user_account_missing

Couldn't find an account associated with the email address supplied.

tenant_inactive

The community that user belongs to is no longer active.

user_account_disabled

The user account associated with the email address has been disabled.

user_account_reactivating

The user account is in the process of being reactivated. An email has been delivered to the email address with further instructions.

Success Response Code: 200

Params

Param name Description
email
required

email of the user


Value: Must be a String
password
required

password of the user


Value: Must be a String

Response Fields

communities array of Socialcast communities that this user has access to Array<Community>
community[name] name of the Socialcast community String
community[subdomain] subdomain of the Socialcast community String
community[domain] the fully qualified domain for accessing the Socialcast community String
community[profile] profile information for the authenticated user's community. See User response for format String
community[default_profile_photo_id] the id of the default profile photo to be used for a user that does not have a photo set Integer
authentication-failure details about authentication request failure Hash
authentication-failure[error-message] human-readable error message describing why the authentication request failed String
authentication-failure[error-code] a machine-readable code describing why the authentication request failed. See Authentication Error Codes for a complete list String
authentication-failure[signup-allowed] indicates whether this server supports creation of new communities Boolean

Example Curl Commands

curl -X POST -v -d "password=demo&email=emily@socialcast.com" https://demo.socialcast.com/api/authentication.json

Examples

POST /api/authentication.json
{
  "email": "active'1@socialcast.com",
  "password": "test"
}
200
{
  "communities": [
    {
      "name": "socialcast, Test & CØ.",
      "subdomain": "socialcast",
      "domain": "socialcast.socialcast.test",
      "attachments_enabled": true,
      "maximum_attachment_size": 104857600,
      "private_messages_enabled": false,
      "thanks_enabled": true,
      "thanks_max_recipients": 10,
      "version": "master",
      "default_profile_photo_id": 1,
      "profile_photo_change_allowed": true,
      "managed_groups_enabled": true,
      "mobile_crash_reports_enabled": true,
      "airwatch_mobile_sdk_enabled": false,
      "external_contributors_enabled": true,
      "google_hangouts_enabled": true,
      "post_enabled": true,
      "group_chat_enabled": true,
      "group_chat_notification_preferences_enabled": false,
      "group_chat": true,
      "one_to_one_group_beta": false,
      "attachment_blacklist": [],
      "one_drive_business_enabled": false,
      "one_drive_business_client_id": null,
      "conversations_enabled": true,
      "air_watch_content_api_key": null,
      "air_watch_content_enabled": false,
      "air_watch_content_selector_url": null,
      "presence_enabled": true,
      "google_drive_enabled": false,
      "profile": {
        "contact_info": {
          "email": "active'1@socialcast.com"
        },
        "manager": null,
        "custom_fields": [],
        "followable": false,
        "contact_id": null,
        "following_count": 0,
        "followers_count": 0,
        "status_message": null,
        "id": 1,
        "first_name": "J'øhn1",
        "last_name": "D'øe1",
        "name": "J'øhn1 D'øe1",
        "html_name": "J&#39;øhn1 D&#39;øe1",
        "url": "https://socialcast.socialcast.test/users/1-j%C3%B8hn1d%C3%B8e1",
        "avatars": {
          "is_system_default": false,
          "id": 1,
          "square16": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/1/rails_square16.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20181015%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181015T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=b0bbd5682b901f00da7464a221db3895767f2b6d14b77330b56e0569c6d6e00b",
          "square30": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/1/rails_square30.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20181015%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181015T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=dd071d190d5db5c0b7d15e39212655274d3e3f2bc693378e3bda3f711825f020",
          "square45": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/1/rails_square45.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20181015%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181015T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=d5d4a09efcb58f74ed08eff3355de09a4506eabe2218a049275850f7d7badd46",
          "square70": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/1/rails_square70.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20181015%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181015T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=924a86c2817d9e20138ba4a5811c1ea0e1896d4afe3577620360639b4a8acebd",
          "square140": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/1/rails_square140.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20181015%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181015T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=0c594a9bd95018a2182ed275691c35b15ec046ff8319e6f04b0bc403db580c8e",
          "original": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/1/rails.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20181015%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181015T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=5edf343d93bfbd387fa36c287ba67d3d421b337151e0db03c94a7d9a088e8e55"
        },
        "username": "Jøhn1Døe1",
        "active": true,
        "terminated": false,
        "inactive": false,
        "role": "member",
        "type": "User",
        "title": null,
        "out_of_office": false,
        "out_of_office_on": null,
        "back_in_office_on": null,
        "company_login": null
      },
      "attachmentsEnabled": true,
      "privateMessagesEnabled": false
    }
  ]
}
POST /api/authentication.json
{
  "email": "active'1@socialcast.com",
  "password": "asdfasdf"
}
401
{
  "authentication-failure": {
    "error-code": "user_account_missing",
    "error-message": "Sorry, we couldn't find an account with the credentials you supplied.",
    "signup-allowed": true
  }
}