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%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=bd33df460dc61273f50d3f708714b64a69354849547cfc49f21658117434b88a",
          "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%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=40542e4cc58b87b5df4a1994308d4fb1f5cbc603855649c664b5457ca1e329d9",
          "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%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=ba0d8b7cc8558480fa35b2c04b245e2e605b7386c0e6b382a84e43d5359f4407",
          "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%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=5aed7df56bf48316c89f8e735d433437715507eda99758204ffbc9678df393ac",
          "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%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=7e78cfb537084dbf9a66ccbba023993c4e11a776bdfb5b01403598fb9276d556",
          "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%2F20171116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171116T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=65895915ec9f6432bd9a90fd81faddc69c2e71c19bb28337c46c29b01e582249"
        },
        "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
  }
}