> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mygigsters.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Log in

> This endpoint is to login so you can create an API key. You need to be signed up to MyGigsters first to be able to log in this way.

### Request Body

**email** `string` *required*

Your email you signed up with MyGigsters

### Responses

| Code | Description |
| - | - |
| `200` | A User object |
| `400` | Email not provided |
| `404` | Email not found on the system |
| `500` | Unknown system error |

### Response fields

**message** `string`

Response from server

> [accordion] Error response fields
>
> **errors** `string`
>
> Error message regarding email

```bash cURL theme={null}
curl 'https://qa-super.mygigsters.com.au/auth/login' -X POST \
         -H "Content-Type: application/json" --data '{"email":"email@email.com"}'
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-super.mygigsters.com.au/auth/login", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "email": "email@email.com"
  }),
});

const data = await response.json();
console.log(data);
```

```python Python theme={null}
import requests

response = requests.post(
    "https://qa-super.mygigsters.com.au/auth/login",
    json={
        "email": "email@email.com",
    },
)

print(response.json())
```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri = URI("https://qa-super.mygigsters.com.au/auth/login")
request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request.body = <<~JSON
  {
    "email": "email@email.com"
  }
JSON

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts JSON.parse(response.body)
```

```php PHP theme={null}
<?php

$ch = curl_init("https://qa-super.mygigsters.com.au/auth/login");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "email": "email@email.com"
}
JSON,
]);

$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
```

```java Java theme={null}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        String body = String.join("\n",
            "{",
            "  \"email\": \"email@email.com\"",
            "}"
        );

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-super.mygigsters.com.au/auth/login"))
            .header("Content-Type", "application/json")
            .method("POST", HttpRequest.BodyPublishers.ofString(body))
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
```

```go Go theme={null}
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{
  "email": "email@email.com"
}`)

	req, err := http.NewRequest("POST", "https://qa-super.mygigsters.com.au/auth/login", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, _ := io.ReadAll(res.Body)
	fmt.Println(string(data))
}
```

```csharp .NET theme={null}
using System.Net.Http.Headers;
using System.Text;

using var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Post, "https://qa-super.mygigsters.com.au/auth/login");
request.Content = new StringContent(@"{
  ""email"": ""email@email.com""
}", Encoding.UTF8, "application/json");

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

```json 200 theme={null}
{
  "message": "OTP sent to your email"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.