Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Acción

POST  https://desa-cointic-api.peypertic.com/cointicAPIv1/auth


Formato del cuerpo (Body) del la llamada

application/json


Parámetros del mensaje


Nombre

Tipo/Formato

Descripción

usernameString

nombre de usuario

REQUERIDO


passwordString

contraseña

REQUERIDO


Ejemplos


Curl

curl -X POST \
https://desa-cointic-api.peypertic.com/cointicAPIv1/auth \
-d '{"username":"payer_nielsen", "password":"******"}'

Node Js


var request = require("request");

var options = { method: 'POST',
url: 'https://desa-cointic-api.peypertic.com/cointicAPIv1/auth',
headers: 
{ 'Content-Type': 'application/json' },
body: { username: 'payer_nielsen', password: '******' },
json: true };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});



Ajax



var settings = {
"async": true,
"crossDomain": true,
"url": "https://desa-cointic-api.peypertic.com/cointicAPIv1/auth",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"cache-control": "no-cache",
"Postman-Token": "2378a6a7-5c99-482d-bc9e-a185f9bd7bce"
},
"processData": false,
"data": "{\"username\":\"payer_nielsen\", \"password\":\"******\"}"
}


$.ajax(settings).done(function (response) {
console.log(response);
});





Error posibles


  • 400 (Bad Request)

          Error en la sintaxis de la llamada o un parámetro mal ingresado.

  • 401 (Unauthorized)

          Falta campo de Authorization o bien el token que sigue al Bearer es incorrecto.

  • 403 (Forbidden)

          El cliente intenta acceder a un recurso al cual no está autorizado.

  • 404 (Not Found)

          Nos indica que el host ha sido capaz de comunicarse con el servidor, pero no existe el recurso que ha sido pedido.

  • 500 (Internal Server Error)

          El servidor tuvo una excepción interna por un error interno.

  • No labels