Discussions

Ask a Question
Back to All

[Error] Invalid user identifier on completions API

Whenever we try to make an API call to submit completions for a customer's learner using the completions endpoint(https://base-api-url/api/v2/completions), we get this error "Invalid user identifier". We are using email as the identifier type and we are getting this error for a lot of learners. I can confirm that all these learners exist on the customers side and are valid learners. Posting below an example request/response body for reference.

REQUEST

{
  "data": {
    "type": "completions",
    "attributes": {
      "user-id": "[email protected]",
      "user-identifier-type": "Email",
      "content-id": "ABC+XYZ",
      "content-id-type": "ExternalId",
      "content-type": "course",
      "completed-at": "2023-10-04T19:11:35.077Z",
      "percentile": 60.0
    }
  }
}

RESPONSE

Client create_course_completion failed: {
  "errors": [
    {
      "id": "exampleid",
      "code": "bad-request",
      "status": 400,
      "title": "Bad Request",
      "detail": "Invalid user identifier: [email protected]",
      "source": "[email protected]"
    }
  ]
}

Any help on this will be highly appreciated!