3

I am using Postman Tool and Insomnia(Hurl.eu) Tool to make a Particular webRequest. I get the Response 200 from Insomnia but i am getting 403 Forbidden error from Postman.Here are the Preview messages from both

Postman:

POST /ccadmin/v1/login HTTP/1.1
Host: ccadmin-test-XXXX.oracleoutsourcing.com:443
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.NlCxWPgJAizSO60YeIBQRjgrYlgUhywr8vmnIca69A=ehkZS1iMzUyLWZkNmE1ODM1ZDM3NSIsImlzcyI6ImFwcGxpY2F0aW9uQXV0aCIsImlyJleHAiOjE1MDU4MzQ5NjIsInN1YiI6ImRiZTYwMGFkLWQwNjYtNDhdCI6MTQ3NDI5ODk2Mn0=.
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials




 Insomnia(Hurl):
    POST /ccadmin/v1/login HTTP/1.1
    Host: ccadmin-test-XXXX.oracleoutsourcing.com:443
    Accept: */*
    Content-Type: application/x-www-form-urlencoded
    Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.NlCxWPgJAizSO60YeIBQRjgrYlgUhywr8vmnIca69A=ehkZS1iMzUyLWZkNmE1ODM1ZDM3NSIsImlzcyI6ImFwcGxpY2F0aW9uQXV0aCIsImlyJleHAiOjE1MDU4MzQ5NjIsInN1YiI6ImRiZTYwMGFkLWQwNjYtNDhdCI6MTQ3NDI5ODk2Mn0=.
    Content-Length: 29

Both request looks similar ,but i am getting 2 different responses. I also disabled Postman Settings->

        i)Send Postman Token Header
        ii)Send no-Cache Header

enter image description here enter image description here

Vijay Manohar
  • 473
  • 1
  • 7
  • 22
  • Did you try to add insomnia's headers manually? (f.e. Accept : */*) – Borys Fursov Jun 18 '18 at 08:06
  • I tried adding Accept : / as well as Accept:*/* .But even then i didn't get any response using postman – Vijay Manohar Jun 18 '18 at 15:01
  • Why in postman port is present and in Insomnia it isn't? – Borys Fursov Jun 18 '18 at 15:19
  • @Borys Fursov I even tried without the portnumber ,its still the same. – Vijay Manohar Jun 18 '18 at 15:45
  • i think you should expand your question a little bit, I am interesting too – Borys Fursov Jun 18 '18 at 16:17
  • @BorysFursov I am having a WebService of a Client, which i am trying to access.Please refer the following https://docs.oracle.com/cd/E93106_01/Cloud.18A/ExtendingCC/html/s0203usetheapplicationkeyforauthentic01.html .With the proper credentials i am able to generate a Web Request using insomnia ,but not using postman.I am more familiar with Postman and this is the first time i am using insomnia.I am really puzzled ,of the reason why postman didn't work,because its my default WebService tool. – Vijay Manohar Jun 18 '18 at 17:27
  • So you are getting this on the login call itself? Can you attach screenshots of the preview and the script in postman? – Tarun Lalwani Jun 18 '18 at 17:50
  • @Tarun Lalwani ,Yes i am getting problem even for Login call.I have already added the preview message in Insomnia and Postman above.I am not sure what do you meant by Script – Vijay Manohar Jun 18 '18 at 18:07
  • The only difference i see is `:443`, can that be a problem here? – Tarun Lalwani Jun 18 '18 at 18:07
  • @Tarun Lalwani Even i added 443 to the url ,i forgot to update here ,but even then i didn't see any difference – Vijay Manohar Jun 18 '18 at 18:18
  • @VijayManohar, The reason I asked for a screenshot of both previews is that may you be missed something which one of us may catch – Tarun Lalwani Jun 18 '18 at 18:20
  • @TarunLalwani i have attached ScreenShot as per your request.Have Authentication Key hidden partially for Security reasons – Vijay Manohar Jun 18 '18 at 18:53

1 Answers1

0

I hope this will help you.

I have found that sometimes Postman behaves a bit weird when you are using Bearer Authorization, this since they made an update to the app and added the "Authorization" tab.
This has happened to me more than ones, specially on pre existing collection.

Let's give it a shot.

  1. Delete the Authentication key on your header, I can see you wrote that one manually. And lets Postman handle that.
  2. Open the Authorization tab, select the Bearer token type from the dropdown, add your token on the window in the left side.
  3. Click on Preview Request.
  4. Now you should be able to see the token on the headers "greyed out"
  5. Open the console, this will help you checking the request and maybe you will find an adicional error.
  6. On the console you can check the raw request and response, it helps.

Also you should try making a request from your machine using CURL ‘yes you can usit on windows and mac’, this way you can discard that you have a closed port.

It might help

Good luck

Pablo Palacios
  • 2,767
  • 20
  • 37