Login
curl --request POST \
--url https://api.hyrd.de/v1/login \
--header 'Content-Type: application/json' \
--data '
{
"user": {
"login": "[email protected]",
"password": "yourpassword123"
}
}
'import requests
url = "https://api.hyrd.de/v1/login"
payload = { "user": {
"login": "[email protected]",
"password": "yourpassword123"
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({user: {login: '[email protected]', password: 'yourpassword123'}})
};
fetch('https://api.hyrd.de/v1/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyrd.de/v1/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user' => [
'login' => '[email protected]',
'password' => 'yourpassword123'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyrd.de/v1/login"
payload := strings.NewReader("{\n \"user\": {\n \"login\": \"[email protected]\",\n \"password\": \"yourpassword123\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyrd.de/v1/login")
.header("Content-Type", "application/json")
.body("{\n \"user\": {\n \"login\": \"[email protected]\",\n \"password\": \"yourpassword123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyrd.de/v1/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": {\n \"login\": \"[email protected]\",\n \"password\": \"yourpassword123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"error": "Invalid Login or password."
}Users
Login
Login API Documentation
API Overview
-
Name: Login API
-
Description: This API endpoint allows users to log in by providing their credentials (username/email and password).
-
Method:
POST -
Endpoint URL:
/v1/login
Authentication
- No authentication is required to access this endpoint, as this is the login process.
Request
HTTP Method:
POST
URL:
/v1/login
Headers:
| Header Name | Description | Required | Example |
|---|---|---|---|
Content-Type | The content type of the request | Yes | application/json |
Accept | Expected response format | No | application/json |
Request Body:
The request body should be sent in JSON format with the following parameters:
| Field Name | Data Type | Description | Required | Example |
|---|---|---|---|---|
email | string | The email of the user | Yes | "[email protected]" |
password | string | The password of the user | Yes | "yourpassword123" |
Responses
Success Response:
-
Status Code:
200 OK -
Message:
Success -
Data:
User object
POST
/
v1
/
login
Login
curl --request POST \
--url https://api.hyrd.de/v1/login \
--header 'Content-Type: application/json' \
--data '
{
"user": {
"login": "[email protected]",
"password": "yourpassword123"
}
}
'import requests
url = "https://api.hyrd.de/v1/login"
payload = { "user": {
"login": "[email protected]",
"password": "yourpassword123"
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({user: {login: '[email protected]', password: 'yourpassword123'}})
};
fetch('https://api.hyrd.de/v1/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyrd.de/v1/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user' => [
'login' => '[email protected]',
'password' => 'yourpassword123'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyrd.de/v1/login"
payload := strings.NewReader("{\n \"user\": {\n \"login\": \"[email protected]\",\n \"password\": \"yourpassword123\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyrd.de/v1/login")
.header("Content-Type", "application/json")
.body("{\n \"user\": {\n \"login\": \"[email protected]\",\n \"password\": \"yourpassword123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyrd.de/v1/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": {\n \"login\": \"[email protected]\",\n \"password\": \"yourpassword123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"error": "Invalid Login or password."
}Headers
Body
application/json
The body is of type object.
Response
401 - application/json
Unauthorized
The response is of type object.