> ## 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.

# Authenticate partner

> Authenticates a partner using their registered email and secret OAuth key. Returns a scoped JWT Bearer access token used to authorize subsequent partner operations such as rotating keys or onboarding connected accounts.

### Headers

**x-api-version** `string` *required*

Target API version (e.g. `1.2`).

### Request Body Parameters

**email** `string` *required*

The registered email address for the partner account.

**oauth\_key** `string` *required*

The 64-character hexadecimal OAuth secret key assigned to the partner.

### Response Body

**success** `boolean`

Indicates whether partner login succeeded (`true`).

**message** `string`

Informational status message (e.g. `Login successful`).

**data.accessToken** `string`

A signed RS256 JWT access token carrying partner scopes and identity. Used in the `Authorization: Bearer <accessToken>` header for subsequent partner API requests.

**data.tokenType** `string`

Authentication scheme type, typically `Bearer`.

**data.expiresIn** `string`

Token lifespan duration (e.g. `5m` for 5 minutes).

### Response Codes

| Code | Description |
| - | - |
| 200 | Login successful. Access token returned. |
| 400 | Bad Request. Missing email or oauthKey in request body. |
| 401 | Unauthorized. Invalid partner credentials or inactive account. |
| 500 | Internal Server Error. An unexpected error occurred on the server. |

```bash cURL theme={null}
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/authenticate-partner \
  -H "Content-Type: application/json" \
  -H "X-API-Version: 1.2" \
  -d '{
  "email": "partner@example.com",
  "oauth_key": "ef1ff6dcaecf1c6710bd41e5e6f76548d8ba0e3fc7aa68bd3996cbfe85885e43"
}'
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/authenticate-partner", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Version": "1.2",
  },
  body: JSON.stringify({
    "email": "partner@example.com",
    "oauth_key": "ef1ff6dcaecf1c6710bd41e5e6f76548d8ba0e3fc7aa68bd3996cbfe85885e43"
  }),
});

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

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

response = requests.post(
    "https://qa-payments.mygigsters.com.au/api/v1/authenticate-partner",
    headers={
        "X-API-Version": "1.2",
    },
    json={
        "email": "partner@example.com",
        "oauth_key": "ef1ff6dcaecf1c6710bd41e5e6f76548d8ba0e3fc7aa68bd3996cbfe85885e43",
    },
)

print(response.json())
```

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

uri = URI("https://qa-payments.mygigsters.com.au/api/v1/authenticate-partner")
request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request["X-API-Version"] = "1.2"
request.body = <<~JSON
  {
    "email": "partner@example.com",
    "oauth_key": "ef1ff6dcaecf1c6710bd41e5e6f76548d8ba0e3fc7aa68bd3996cbfe85885e43"
  }
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-payments.mygigsters.com.au/api/v1/authenticate-partner");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json",
        "X-API-Version: 1.2",
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "email": "partner@example.com",
  "oauth_key": "ef1ff6dcaecf1c6710bd41e5e6f76548d8ba0e3fc7aa68bd3996cbfe85885e43"
}
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\": \"partner@example.com\",",
            "  \"oauth_key\": \"ef1ff6dcaecf1c6710bd41e5e6f76548d8ba0e3fc7aa68bd3996cbfe85885e43\"",
            "}"
        );

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/authenticate-partner"))
            .header("Content-Type", "application/json")
            .header("X-API-Version", "1.2")
            .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": "partner@example.com",
  "oauth_key": "ef1ff6dcaecf1c6710bd41e5e6f76548d8ba0e3fc7aa68bd3996cbfe85885e43"
}`)

	req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/authenticate-partner", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("X-API-Version", "1.2")

	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-payments.mygigsters.com.au/api/v1/authenticate-partner");
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
  ""email"": ""partner@example.com"",
  ""oauth_key"": ""ef1ff6dcaecf1c6710bd41e5e6f76548d8ba0e3fc7aa68bd3996cbfe85885e43""
}", Encoding.UTF8, "application/json");

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

```json Response theme={null}
{
  "success": true,
  "message": "Login successful",
  "data": {
    "access_token": "eyJhbGciOiJSUzI1NiIs...",
    "token_type": "Bearer",
    "expires_in": "5m"
  }
}
```


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