Iniciar el registro de una cuenta
curl --request POST \
--url https://api.qbank.cl/platform/v1/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"org": "cbpay",
"type": "person",
"email": "ana@ejemplo.com",
"password": "una-clave-segura",
"display_name": "Ana Perez",
"country": "CL"
}
'import requests
url = "https://api.qbank.cl/platform/v1/auth/register"
payload = {
"org": "cbpay",
"type": "person",
"email": "ana@ejemplo.com",
"password": "una-clave-segura",
"display_name": "Ana Perez",
"country": "CL"
}
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({
org: 'cbpay',
type: 'person',
email: 'ana@ejemplo.com',
password: 'una-clave-segura',
display_name: 'Ana Perez',
country: 'CL'
})
};
fetch('https://api.qbank.cl/platform/v1/auth/register', 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.qbank.cl/platform/v1/auth/register",
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([
'org' => 'cbpay',
'type' => 'person',
'email' => 'ana@ejemplo.com',
'password' => 'una-clave-segura',
'display_name' => 'Ana Perez',
'country' => 'CL'
]),
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.qbank.cl/platform/v1/auth/register"
payload := strings.NewReader("{\n \"org\": \"cbpay\",\n \"type\": \"person\",\n \"email\": \"ana@ejemplo.com\",\n \"password\": \"una-clave-segura\",\n \"display_name\": \"Ana Perez\",\n \"country\": \"CL\"\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.qbank.cl/platform/v1/auth/register")
.header("Content-Type", "application/json")
.body("{\n \"org\": \"cbpay\",\n \"type\": \"person\",\n \"email\": \"ana@ejemplo.com\",\n \"password\": \"una-clave-segura\",\n \"display_name\": \"Ana Perez\",\n \"country\": \"CL\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/auth/register")
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 \"org\": \"cbpay\",\n \"type\": \"person\",\n \"email\": \"ana@ejemplo.com\",\n \"password\": \"una-clave-segura\",\n \"display_name\": \"Ana Perez\",\n \"country\": \"CL\"\n}"
response = http.request(request)
puts response.read_body{
"status": "pending_verification",
"note": "check your email for the verification code; complete registration with POST /v1/auth/register/confirm"
}Iniciar el registro de una cuenta
Crea una cuenta de persona o empresa en estado pendiente de verificaci…n. Nunca crea una sesi…n. Los emails nuevos y duplicados devuelven la misma respuesta para evitar enumeraci…n; al titular real se le avisa por email ante un duplicado.
POST
/
v1
/
auth
/
register
Iniciar el registro de una cuenta
curl --request POST \
--url https://api.qbank.cl/platform/v1/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"org": "cbpay",
"type": "person",
"email": "ana@ejemplo.com",
"password": "una-clave-segura",
"display_name": "Ana Perez",
"country": "CL"
}
'import requests
url = "https://api.qbank.cl/platform/v1/auth/register"
payload = {
"org": "cbpay",
"type": "person",
"email": "ana@ejemplo.com",
"password": "una-clave-segura",
"display_name": "Ana Perez",
"country": "CL"
}
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({
org: 'cbpay',
type: 'person',
email: 'ana@ejemplo.com',
password: 'una-clave-segura',
display_name: 'Ana Perez',
country: 'CL'
})
};
fetch('https://api.qbank.cl/platform/v1/auth/register', 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.qbank.cl/platform/v1/auth/register",
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([
'org' => 'cbpay',
'type' => 'person',
'email' => 'ana@ejemplo.com',
'password' => 'una-clave-segura',
'display_name' => 'Ana Perez',
'country' => 'CL'
]),
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.qbank.cl/platform/v1/auth/register"
payload := strings.NewReader("{\n \"org\": \"cbpay\",\n \"type\": \"person\",\n \"email\": \"ana@ejemplo.com\",\n \"password\": \"una-clave-segura\",\n \"display_name\": \"Ana Perez\",\n \"country\": \"CL\"\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.qbank.cl/platform/v1/auth/register")
.header("Content-Type", "application/json")
.body("{\n \"org\": \"cbpay\",\n \"type\": \"person\",\n \"email\": \"ana@ejemplo.com\",\n \"password\": \"una-clave-segura\",\n \"display_name\": \"Ana Perez\",\n \"country\": \"CL\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/auth/register")
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 \"org\": \"cbpay\",\n \"type\": \"person\",\n \"email\": \"ana@ejemplo.com\",\n \"password\": \"una-clave-segura\",\n \"display_name\": \"Ana Perez\",\n \"country\": \"CL\"\n}"
response = http.request(request)
puts response.read_body{
"status": "pending_verification",
"note": "check your email for the verification code; complete registration with POST /v1/auth/register/confirm"
}Cuerpo
application/json
Respuesta
Registro iniciado; no se emite sesi...n.