Salesforce

Authentication APIs

« Go Back
Information
Authentication APIs
000004374
Public
Product Selection
aiWare - aiWare
Article Details

Use these APIs for token-based authentication in aiWARE.

Log in and get the session token

Logs in the user and retrieves the session token.

 Example

mutation userLogin {
  userLogin(input: {userName: "jdoe@mycompany.com" password: "Password123"}) {
    token
  }
}

Response

{
  "data": {
    "userLogin": {
      "token": "98b80884-a9f5-49ef-a7c6-bab43751218e"
    }
  }
}

Errors (User not found)

{
  "data": {
    "userLogin": null
  },
  "errors": [
    {
      "message": "The requested object or entity could not be found",
      "name": "not_found",
      "time_thrown": "2019-03-04T17:13:49.691Z",
      "data": {
        "serviceMessage": "404 - undefined",
        "requestId": "0A0B018B:47AA_0A0B664F:0050_5C7D5CCC_98997F2:6132",
        "errorId": "d089ba45-e0a5-408f-b5b3-fefa33951f73"
      },
      "path": [
        "userLogin"
      ],
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ]
    }
  ]
}

Validate token

Validates the authentication token.

Example

mutation validateToken {
  validateToken(token: "78cac3d0-684d-486e-8d86-8890dbae72e2") {
    token
  }
}

Log out user session

Logs the user out from the session.

Example

mutation userLogout {
  userLogout(token: "3c15e237-94a5-4563-9be7-4882acc7fa74")
}

More API examples

Additional Technical Documentation Information
Properties
8/26/2024 9:32 PM
8/26/2024 9:35 PM
8/26/2024 9:35 PM
Documentation
Documentation
000004374
Translation Information
English

Powered by