amagovpt / doc-safe Goto Github PK
View Code? Open in Web Editor NEWDocumentação técnica relativa ao serviço de assinatura de faturas eletrónicas (SAFE)
Documentação técnica relativa ao serviço de assinatura de faturas eletrónicas (SAFE)
Fiz o processo de autenticação e retornei o token, refresh_token, etc usando o clientName = clientTest.
Agora estou a tentar pegar as crendenciais com os dados de teste conforme documentação.
Mas está retornando um 400 sem explicação alguma.
Alguém consegue me ajudar?
var client = new RestClient("https://pprsafe.autenticacao.gov.pt/credentials/list");
var request = new RestRequest(Method.POST);
request.AddHeader("SAFEAuthorization", "Bearer 2cebc546-cb0d-482b-92dc-87a3329e4d90");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic Y2xpZW50VGVzdDpUZXN0");
var body = @"{" + "\n" +
@" ""clientData"": {" + "\n" +
@" ""clientName"": ""clientTest""," + "\n" +
@" ""processId"": ""1015722c-456e-4abc-9efb-d774936ce755""" + "\n" +
@" }" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
{
"error": "Bad Request",
"error_description": "Bad Request"
}
The latest schema file points to a localhost address.
Wouldn't it make sense to offer official schema files for both production and test environment?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.