NuxtJS - Error 401 (Unauthorized) on localhost - authorization

I guys, I cannot find a way to fix this problem:
I get a 401 error (unauthorized) when trying to get data from the API on localhost, we are using azure to hold both the API and the website in dev mode.
The strange thing is that my user is getting the correct authorization on ***-app-dev.azurewebsites.net and everything is working fine in there, but the same user is not getting data (and authorization) on localhost:3000.
Do you have some idea on what can be the problem?

Related

GET request to opensea API giving 403 error

I'm trying to retrieve the asset info from a specific collection using the asset endpoint.
Example:
https://api.opensea.io/api/v1/asset/0x1a92f7381b9f03921564a437210bb9396471050c/2000/?format=json
Now, if you open that on your browser, it works flawlessly, but on your app or postman it just gives a 403 error by CloudFlare.
This is not a 401 error and we shouldn't need an API key for this.
So what is going on and how do I fix this? Any ideas?

Getting a 401 http response (sometimes) while request is proper

i've been facing a problem lately and i don't know how to handle it, or even what the problem might be coming from.
Tools:
-MYSQL(for data base)
-JAVA EE web application(to service as back-end)
-Jersey 2.26 dependency (to service as API on top of web application /CORS filter implemented)
-Apache Tomcat/7.0.69 ( as web server where web app sets )
-Angular 4 ( as website and client to the API)
-CentOS Linux release 7.3 (Core) (Server operating system )
Problem:
once the request is sent to the API ( to a specific secured Endpoint ) lets call it customers, Sometimes the response is 401 Unauthorized, and in other times it works just fine, from the angular website for instance, if press f12 and follow the requests, i send the same request again ( for the one i got 401 for ) but this time it works, the JWT is valid and it works just fine, and its not that there is too many request going to the server, even if its few sometimes i get 401, but most of the time it works great.
the only thing in the code that can return 401 is the authentication filter, which checks the validity of token, but it looks fine to me.
i checked this article that talks about 401 response, but still, its hard for me to grasp the idea why it works good sometimes and not work other times for the same request. i get the 401 while checking with the website and also with checking with postman. so i guess it's not a cache or cookies thing, but i might be wrong to assume this.
any ideas on what might be wrong ? or where should i be checking for bugs or errors ?
Thanks allot
Set tomcat security to false .

What could be the reason for Okta Log Api giving internal Server Error 500 through code but giving result when run from Postman

I have a windows service which hits Okta Event Api
http://developer.okta.com/docs/api/resources/events.html
Now I have changed code to hit Okta Log Api
http://developer.okta.com/docs/api/resources/system_log.html
Problem : While Log api Get request works fine from postman tool it gives "Internal Server Error 500" when i run it from Code. The previous Event Api works perfectly fine from code and postman both.
This is what I get in response:
{"errorCode":"E0000009","errorSummary":"Sorry, there's been an error. We aren't sure what caused it, but we've logged this and will work to address it. Please try your request again.","errorId":"7f997bbe-7a31-4431-9f42-ae40db5200ac"}
What could be a possible reason for this?

403 Access Denied for customers in Magento REST API

I am getting 403 Access Denied error for http://www.example.com/rest/api/customers in Magento 1.9.2.4. Everything in admin side rest & admin roles and resources are proper and set to "All". Though http://www.example.com/rest/api/products is working but not able to fetch customers and getting Access Denied.
I tried with other Magento version setups also in same server but all gives 403 Access Denied error for customers and working fine for products.
Server is using SUPHP. What could be solution?
Thanks
How are you making the calls? Is it a php script or are you using something like this? You need to give this detail to identify the erroe
How to use POSTMAN rest client with magento REST api with Oauth. How to get Token and Token Secret?
I have found this tutorial is great to pinpoint where the error are ie the parameters not being encoded with the url etc

Siteminder 403 - possible causes

Im pretty new to webservice etc and I need figure out what is causing a http 403 response code.
I am hitting a service that was recently secured using siteminder, what I need to find out is what siteminder expects when receiving a http get request. Is there anyway I can find this out I assume that it is authenticating correctly due to the 403.
Im thinking that the request maybe missing some headers or indeed cookies I'm just finding it hard figuring out what is needed and would be great if I can get some guidance into how to at least find out what is expected.
I can hit the service fine through the browser.
T.I.A
You should turn on tracing on the web agent, check the log and see what headers are being sent, and if the 403 is coming from SiteMinder or your web service