Reset password
curl --request POST \
--url https://app.oryzacloud.app/auth/password/reset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d",
"email": "admin@example.com",
"password": "correct-horse-battery-staple",
"password_confirmation": "correct-horse-battery-staple"
}
'import requests
url = "https://app.oryzacloud.app/auth/password/reset"
payload = {
"token": "b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d",
"email": "admin@example.com",
"password": "correct-horse-battery-staple",
"password_confirmation": "correct-horse-battery-staple"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
token: 'b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d',
email: 'admin@example.com',
password: 'correct-horse-battery-staple',
password_confirmation: 'correct-horse-battery-staple'
})
};
fetch('https://app.oryzacloud.app/auth/password/reset', 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://app.oryzacloud.app/auth/password/reset",
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([
'token' => 'b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d',
'email' => 'admin@example.com',
'password' => 'correct-horse-battery-staple',
'password_confirmation' => 'correct-horse-battery-staple'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.oryzacloud.app/auth/password/reset"
payload := strings.NewReader("{\n \"token\": \"b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d\",\n \"email\": \"admin@example.com\",\n \"password\": \"correct-horse-battery-staple\",\n \"password_confirmation\": \"correct-horse-battery-staple\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.oryzacloud.app/auth/password/reset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d\",\n \"email\": \"admin@example.com\",\n \"password\": \"correct-horse-battery-staple\",\n \"password_confirmation\": \"correct-horse-battery-staple\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.oryzacloud.app/auth/password/reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d\",\n \"email\": \"admin@example.com\",\n \"password\": \"correct-horse-battery-staple\",\n \"password_confirmation\": \"correct-horse-battery-staple\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"redirect_to": "/",
"send_to_login": false
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>",
"source": {
"field": "<string>"
}
}
]
}Autenticação
Redefinir Senha
Define uma nova senha para a conta utilizando o token de recuperação.
POST
/
auth
/
password
/
reset
Reset password
curl --request POST \
--url https://app.oryzacloud.app/auth/password/reset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d",
"email": "admin@example.com",
"password": "correct-horse-battery-staple",
"password_confirmation": "correct-horse-battery-staple"
}
'import requests
url = "https://app.oryzacloud.app/auth/password/reset"
payload = {
"token": "b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d",
"email": "admin@example.com",
"password": "correct-horse-battery-staple",
"password_confirmation": "correct-horse-battery-staple"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
token: 'b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d',
email: 'admin@example.com',
password: 'correct-horse-battery-staple',
password_confirmation: 'correct-horse-battery-staple'
})
};
fetch('https://app.oryzacloud.app/auth/password/reset', 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://app.oryzacloud.app/auth/password/reset",
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([
'token' => 'b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d',
'email' => 'admin@example.com',
'password' => 'correct-horse-battery-staple',
'password_confirmation' => 'correct-horse-battery-staple'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.oryzacloud.app/auth/password/reset"
payload := strings.NewReader("{\n \"token\": \"b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d\",\n \"email\": \"admin@example.com\",\n \"password\": \"correct-horse-battery-staple\",\n \"password_confirmation\": \"correct-horse-battery-staple\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.oryzacloud.app/auth/password/reset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d\",\n \"email\": \"admin@example.com\",\n \"password\": \"correct-horse-battery-staple\",\n \"password_confirmation\": \"correct-horse-battery-staple\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.oryzacloud.app/auth/password/reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d\",\n \"email\": \"admin@example.com\",\n \"password\": \"correct-horse-battery-staple\",\n \"password_confirmation\": \"correct-horse-battery-staple\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"redirect_to": "/",
"send_to_login": false
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>",
"source": {
"field": "<string>"
}
}
]
}Resposta
string
Tipo de recurso retornado pela API (ex:
server, stats, list, api_key).object
Atributos detalhados do recurso retornado.
Exemplo de Uso
curl -X POST "https://app.oryzacloud.app/auth/password/reset" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const response = await fetch("https://app.oryzacloud.app/auth/password/reset", {
method: "POST",
headers: {
"Accept": "application/json",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);
Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corpo
application/json
The password reset token.
Exemplo:
"b6e22f85d63c4d9db9739f9ab0a27a48f51f7ad38ef8c12fd157c4c6f4b2e51d"
The account email address.
Exemplo:
"admin@example.com"
The new account password. Must be at least eight characters.
Exemplo:
"correct-horse-battery-staple"
Confirmation matching the new account password.
Exemplo:
"correct-horse-battery-staple"