0

I use fabric Kony and I have given to Postman Username pass of Fabric to authenticate

enter image description here

and entered this prerequest script:

const postRequest = {
  url: 'https://sandbox-api.marqeta.com/v3/swagger.json',
  method: 'POST',
  timeout: 0,
  header: {
    "Content-Type": "application/x-www-form-urlencoded"
  },
  body: {
    mode: 'urlencoded',
    urlencoded: [
        {key: "grant_type", value: "password"},
        {key:"username", value: "........."},
        {key:"password", value: ".........."},
    ]}
};
pm.sendRequest(postRequest, function (err, res) {
    var responseJson = res.json();
    console.log(responseJson);
    pm.environment.set('ACCESS_TOKEN', responseJson['access_token']);
});
zante
  • 1
  • 1

1 Answers1

0

I'm not an user of POSTMAN, but I know a little of Kony Fabric.

If you hit the web url of a Kony Fabric you'll notice that the first call will generate an oauth_token (for example 0526b30c-6579-4965-a774-87224815ea3a) that will be used for further calls.

I think that you should catch this token before trying to connect to the Kony Fabric with a user's credentials.

Cordially, Hervé N.

arcturien
  • 11
  • 3