Giter VIP home page Giter VIP logo

doc-safe's Issues

credentials/list bad request

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"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.