> For the complete documentation index, see [llms.txt](https://docs.hoola.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hoola.vn/english/api/remove-course-from-user.md).

# Remove a course from a user

## Remove a course from a user

<mark style="color:blue;">`GET`</mark> `https://abc.hoola.vn/manage/api/courses/remove-course-from-user`

#### Query Parameters

| Name     | Type   | Description                  |
| -------- | ------ | ---------------------------- |
| token    | string | Account Authentication Token |
| userId   | string | User ID                      |
| courseId | string | Course ID                    |

{% tabs %}
{% tab title="200 Query successfully" %}

```javascript
// Response Code "00". Query successfully.
// Return data: 
{
    "respCode": "00",
    "msg": "Success"
}
```

{% endtab %}

{% tab title="400 Missing parameter or account/course not found." %}

```javascript
// Response Code "02". Token not provided.
// Return data:
{
    "respCode": "02",
    "msg": "No token"
}


// Response Code "03". No userId parameter. 
// Return data:
{
    "respCode": "03",
    "msg": "No userId parameter"
}


// Response Code "04". No courseId parameter.
// Return data:
{
    "respCode": "04",
    "msg": "No courseId parameter"
}


// Repsonse Code "08". Account not found.
// Return data:
{
    "respCode": "08",
    "msg": "User not found"
}


// Response Code "09". Not found this course in this account.
// Return data:
{
    "respCode": "09",
    "msg": "Not found this course in this user"
}
```

{% endtab %}

{% tab title="401 Fail to verify your account" %}

```javascript
// Response Code "06". Token is invalid or has expired.
// Return data:
{
    "respCode": "06",
    "msg": "Invalid token || Token has expired"
}
```

{% endtab %}

{% tab title="403 Your account is not authorized to perform the query" %}

```javascript
// Response Code "07". Your account is not authorized to perform the query.
// Return data:
{
    "respCode": "07",
    "msg": "Your account does not have permission"
}
```

{% endtab %}

{% tab title="405 Wrong request method" %}

```javascript
// Response Code "01". Wrong request method.
// Return data:
{
    "respCode": "01",
    "msg": "Request method should be GET"
}
```

{% endtab %}

{% tab title="500 Server error" %}

```javascript
// Resposne Code "05". Server not able to authenticate your account.
{
    "respCode": "05" 
    "msg": "Server not able to authenticate your account"
}


// Response Code "10". Server is not able to remove this course from this user.
// Return data:
{
    "respCode": "10" 
    "msg": "Server is not able to remove this course from this user"
}
```

{% endtab %}
{% endtabs %}

Example:

```javascript
// GET:
https://abc.hoola.vn/manage/api/courses/remove-course-from-user?token=sdhg23797sdbv9186jdvk58&userId=sfh959sdsd&courseId=ljd092785hdbxn
```
