Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Acción

POST  https://a.payperticdesa-cointic-api.peypertic.com/auth/realms/entidades/protocol/openid-connect/token

Tipo de mensaje

x-www-form-urlencodedcointicAPIv1/auth


Formato del cuerpo (Body) del la llamada

application/json


Parámetros del mensaje


Nombre

Tipo
/Formato

Descripción

username
string
String

nombre de usuario

Status
colourRed
titlerequerido


password
string
String

contraseña

Status
colourRed
titleRequerido

grant_type


Ejemplos

...


Curl

...

Tipo de grant usado para la autenticación en el servicio.

Status
colourRed
titleRequerido

...

Identificador del cliente.

Status
colourRed
titleRequerido

...

Clave de identificación de autenticación.

Status
colourRed
titleRequerido

Ejemplo

POST /auth/realms/entidades/protocol/openid-connect/token HTTP/1.1 Host: a.paypertic.com Content-Type: application/x-www-form-urlencoded Cache-Control: no-cache Postman-Token: 46944d22-ffe6-449d-a921-b150110569e6 username=usuario&password=contrasea&grant_type=password&client_id=16462308-1844-4abe-abe6-f184149ee740&client_secret=a2d03fa3-fcs4-45e5-9792-dc0d8b51a25c
Code Block
languagejs
titleAutenticación
collapsetrue
Code Block
themeMidnight
curl -X POST \
https://desa-cointic-api.peypertic.com/cointicAPIv1/auth \
-d '{"username":"payer_nielsen", "password":"******"}'

Node Js


Code Block
themeMidnight
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


Code Block
themeMidnight
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

  • 4000  Invalid request.

  • 4001  Invalid payment id.

  • 4002  Invalid payment type.

  • 4004  Invalid collector.

  • 5001  Internal service error.