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

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?

Related

NuxtJS - Error 401 (Unauthorized) on localhost

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?

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 .

Google Authentication error "500. That’s an error"

Since about 1 week ago I'm getting consistently 500. That’s an error from accounts.google.com side when trying to authenticate with Google.
The first request to
https://accounts.google.com/o/oauth2/auth?scope=openid%20email%20https://adwords.google.com/api/adwords/%20https://www.googleapis.com/auth/drive%20https://spreadsheets.google.com/feeds%20https://docs.google.com/feeds&response_type=token&redirect_uri=https://<XXXXXX>/&state=<XXXX>2&client_id=<MY_CLIENT_NUMBER>.apps.googleusercontent.com&hd=
returns 200, but then the second request to
https://accounts.google.com/signin/oauth?hd&client_id=<app_id>.apps.googleusercontent.com&as=-XXXXXX&nosignup=1&destination=https://<my_app_uri>&approval_state=<somewhatrandomstate>&xsrfsig=<signature>
almost always fails with 500.
I'm using Java Google API client version 1.22.0 and my application is deployed on AWS (region eu-central-1). I'm currently signed in to multiple google accounts, so Account Chooser is triggered.
Any ideas what could be the problem? This auth flow worked fine for long time before then.
The problem was a very slight change of behavior on Google side. Mainly handling hd parameter. Before this change hd parameter was accepted even empty, but now when it's empty it usually ends up with status code 500.

"Sorry, an error occurred while processing this request" instagram api python-instagram

I'm using python-instagram library to get access to instagram api. But when I run my app (flask rest api application), my auth method which use InstagramAPI and get_authorize_login_url method raise 500 error:
raise OAuth2AuthExchangeError("The server returned a non-200 response for URL %s %s %s" % (url, response['status'], content))
OAuth2AuthExchangeError: The server returned a non-200 response for URL https://api.instagram.com/oauth/authorize?scope=basic&redirect_uri=http%3A%2F%2Fsocialservice.test.5-soft.com%3A8515%2Finstagram%2Fauth&response_type=code&client_id=c5095d88cee14bac91a9341e6e82ff8f 500 Sorry, an error occurred while processing this request.
In my local machine it works without any problems but in the production server with different IP I've got this problem.
I would be very appreciative if someone can help to solve me this problem
Thanks in advance,
Ron
Please clarify:
In my local machine it works without any problems but in the production server with different IP I've got this problem.
How can you be performing authorization on your local machine? Instagram's API requires a public url for redirect_uri.
Next, I haven't found any evidence to verify this, but I don't believe you can specify a custom port in your callback url (you've provided http://socialservice.test.5-soft.com:8515/instagram/auth).
Last, assuming it's your callback server that is the problem, that error usually occurs when you aren't returning the correct response back to Instagram. The server needs to echo out only the value of the GET parameter code as plaintext.
If I browse to here: http://socialservice.test.5-soft.com:8515/instagram/auth?code=test I get no response, which is likely the cause of your error.