# Get All Course

## Upon successful response you will get access token and refresh token

<mark style="color:blue;">`GET`</mark> `https://castleindia.in/emart/public /api/login`

#### Headers

| Name   | Type   | Description      |
| ------ | ------ | ---------------- |
| Accept | String | application/json |

#### Request Body

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| password | String | enter user password     |
| email    | String | enter user email addres |

{% tabs %}
{% tab title="200: OK Cake Successfully retrieved" %}
<pre class="language-javascript"><code class="lang-javascript"><strong>{
</strong>  ```json
"token_type": "Bearer",
    "expires_in": 864000,
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIyIiwianRpIjoiMTA1NDM3M2Y0ZjIxNzBmMjE1NzdiMTBhMDg2NzA0M2U4MmU2OGRiNDMyMGEwNzRlODRiMTA2ZGU4OWM0NTVkM2U0NGVlMDAzODUzMzdkMjciLCJpYXQiOjE2NzE1MzIzODkuMjk2NjM4OTY1NjA2Njg5NDUzMTI1LCJuYmYiOjE2NzE1MzIzODkuMjk2NjQzMDE4NzIyNTM0MTc5Njg3NSwiZXhwIjoxNjcyMzk2Mzg5LjI4NzgyMDEwMDc4NDMwMTc1NzgxMjUsInN1YiI6IjEiLCJzY29wZXMiOlsiKiJdfQ.MHy_vP1LH5DnBL8aC4oybJu474mnUcEYaJaaVjx7HY5YGNCXKEFHppETU-9nK7tTk-i9q8dd_qTbhfpj7Cui1zpnn_CHiIPY7IEwMAK29auVlwwCUA8qEn-Wj-emowtyEelstMseq3f8IeAlsxZzyADgU-wVFc3Znprljrz2AF5TRwQus1XjFzj60Wv6xvr1c7BWvHuPML9kgxKr4ecuVwvtqAexD8NLn50fDgoV92cFc1dkQAKpSd8Z2canKd0HjplUw85DlJVyJedY5LXgOP0KJeHPl6HqkrnMZcF6utaOvPV3DUYFbM0ezYRBeSMiDQkNUwUTp585mTsQPGyvq0mZkJQO-YBdy_OSfONP-S3-9JJW3dEQYmXnQfz1Z7u0zPibBwizu1oUoKD8MXDkNFu6sj5vKnsgBnytDdIHSkqNJft3fPUzq5PYYZil1GCiAvN9vJKRW_T0NvSmHq-d3unaKn3XbeyCTYjn7UrNOUtZ4_3pRbOaKn0m-AATuUHW3ae-dJDCrmq3mHR2r73kARPZXzNEwSxPmdIc0W_nse6iVJMRzRugevrAEeO3vbqrM3Txslk69bbdVBj2Ytng242NzDAFMufU9YSDLSVggAFnWTeSEuWF1_dwFGPmUpNE_op4cah9p0VzoYidu35HuxMPO_sx5JLoXetJRN23e5g",
    "refresh_token": "def502009d3fd0250d60709804387ea2196e374f3cfb64a55ca4dcce59845793c412555a358fb012aeda0f821a03bde985a08f67f40e6e8e89753dbad7fdd7aa5b00c39f1e4d45c22dc2eef5d62e76ed0ea89317dd5e804ff1b181dc3ed1bb0c970b4ec7f192b28a619b2cdbe8da1553a8258ab9fbc57d3abf11cdd6c242f290b0f3c2be4a03515abd3203d0b43cf9cbfc6f8161c70f72ec31bd31e7ae2673772e6c9aba1eaac525c876c09b170f5f325f0eb8bee994e7e28ad7d4e46f8686ef9ca191edce6e530a2a3718ad1408fae7934a9547f51f7dd9779bc98d261eafb1c7c84176a014ce37b50b4c93581006e1a4fc95378e3ad258a31b0bd390e83c47eb98cfe2475d04d41749f1a24d1e5184210138dd69a45fe718e819de327bf7bf1182c2fa95fe871fef1609f26be4ca4a14baa854aa598194977d59cc4ac9f35843d2d2bf0efbd71ab2ab4a67066b742efa0757ea6acc9f491d174ae96cb233f0953ecce8"
```
}
</code></pre>
{% endtab %}
{% endtabs %}

### IF response fail

````
```html
<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8" />
	<meta name="robots" content="noindex,nofollow,noarchive" />
	<title>An Error Occurred: Method Not Allowed</title>
	<style>
		body {
			background-color: #fff;
			color: #222;
			font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
			margin: 0;
		}

		.container {
			margin: 30px;
			max-width: 600px;
		}

		h1 {
			color: #dc3545;
			font-size: 24px;
		}

		h2 {
			font-size: 18px;
		}
	</style>
</head>

<body>
	<div class="container">
		<h1>Oops! An Error Occurred</h1>
		<h2>The server returned a "405 Method Not Allowed".</h2>

		<p>
			Something is broken. Please let us know what you were doing when this error occurred.
			We will fix it as soon as possible. Sorry for any inconvenience caused.
		</p>
	</div>
</body>

</html>
```
````
