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 
{
  "email": "active'7@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": 2,
      "profile_photo_change_allowed": true,
      "mobile_crash_reports_enabled": true,
      "external_contributors_enabled": true,
      "google_hangouts_enabled": true,
      "post_enabled": true,
      "group_chat_enabled": true,
      "chat_oriented": true,
      "group_chat": true,
      "one_to_one_group_beta": false,
      "attachment_blacklist": [],
      "one_drive_business_enabled": false,
      "one_drive_business_client_id": null,
      "air_watch_content_api_key": null,
      "air_watch_content_enabled": false,
      "air_watch_content_selector_url": null,
      "google_drive_enabled": false,
      "conversations_enabled": true,
      "profile": {
        "contact_info": {
          "email": "active'7@socialcast.com"
        },
        "manager": null,
        "custom_fields": [],
        "followable": false,
        "contact_id": null,
        "following_count": 0,
        "followers_count": 0,
        "status_message": null,
        "id": 11,
        "first_name": "J'øhn10",
        "last_name": "D'øe10",
        "name": "J'øhn10 D'øe10",
        "html_name": "J&#39;øhn10 D&#39;øe10",
        "url": "https://socialcast.socialcast.test/users/11-j%C3%B8hn10d%C3%B8e10",
        "avatars": {
          "is_system_default": false,
          "id": 2,
          "square16": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/2/rails_square16.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170420T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=32e05d9b035146a97ef60013f0120ea00b70b19735790658044ea1ce20e77501",
          "square30": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/2/rails_square30.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170420T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=b6e8ff75e263d269e012436015d9f9bb8001c610caa74223fdf6adc5d974fa92",
          "square45": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/2/rails_square45.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170420T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=49d07b66e65869f1275e67f3d46610ec204484590f8c7f98910b1cbaca772ef5",
          "square70": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/2/rails_square70.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170420T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=c69d7c224fbcd817ed99037473c06787afe0b68ce0104f80b702c2d9ff0aa247",
          "square140": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/2/rails_square140.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170420T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=09fbb74502e4537ff504899b37458636dd30a96f36382e7eaf1939669d65c711",
          "original": "https://s3.amazonaws.com/socialcast_test/tenants/1/profile_photos/2/rails.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170420T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=21dade1f704ef374d77b35ecbafdfc187c6d7485ff4ca27091dbefb53ed23748"
        },
        "username": "Jøhn10Døe10",
        "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 
{
  "email": "active'7@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
  }
}