Forge Authentication: How to handle GatewayTimeout on Refresh - autodesk-forge

We've got an Autodesk Forge application that uses an initial 3-legged OAuth to get a token, and then keeps refreshing it as needed to get things done.
We're running into occasions where we get back a GATEWAY TIMEOUT error from the RefreshToken call.
We do retry up to 3 times after encountering it - but it seems like we immediately get BAD REQUESTs.
We feel like the Refresh is actually happening (so a new refresh token is generated) - but because of the Gateway Timeout, we're not getting the new refresh token back.
I feel like the Gateway timeout is being reported in Autodesk's API wrapper service (Apogee?) - so there's nothing I can control about it - is that correct? Any recommendations for what to do?
Thanks,
Matt

Related

ERR_UNEXPECTED_PROXY_AUTH for preflight request in chrome only first time

While hitting AWS gateway API's, there is getting ERR_UNEXPECTED_PROXY_AUTH error with status:0 on preflight (OPTIONS)request.
This error is on first time only and when it tries for the second time its working fine as expected.
Any comments on the same.
API is hitting from Angular application.
What I should try to resolve this issue?
Is there any changes needs to be done from frontend side?
Is this backend related issue?

Azure APIM -old developer portal not waiting more than a minute and its stopped

We have a backend webservice which takes more than 1 minute to send response to the requester. APIM has configured to send requests to the backend service thru API. I have set forward request policy for this api to extend timeout settings to 180 secs. When I try this api with postman I'm getting response in 1 min 36 ms. and timeout works fine. But when I try with developer portal, request getting stopped exactly in 1 min and its not showing any response(its blank). How to increase this duration in old developer portal to wait response from backend service more than a minute.
Thanks
According to some research, it seems there is no way to increase the timeout in developer portal. It works in postman because we can configure timeout in postman like below screenshot:
As postman can meet your requirement, I think you can test the api in postman easily. If you still want to test in developer portal, you can raise a ticket on feedback page to ask azure develop team add this feature.

ExactOnline - Error 403: Forbidden - The division is blocked

I am using ExactOnline API to fetch the transactions, my API is working fine, but suddenly the Error 403: Forbidden - The division is blocked error occurs and API return the empty result.
Please help.
Thanks.
An HTTP 403 with reason "The division is blocked" typically means the administration is temporarily blocked by a process that needs exclusive access to the administration. Examples are:
One of the company's users is creating or restoring a backup of the administration.
Exact is moving the administration to a different database. (After office hours; users are notified in advance through Exact Online's workflow system.)
API clients should be able to handle this situation. The typical solution is to try again at a later time.
You can find a full list of response codes here:
https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-respcodeserrorhandling

Azure API gateway and app service, concurrency limitation?

Have an odata api endpoint hosted in App Service behind API Management Gateway, but getting concurrency call issues, trying to identify where the problem occurs. We use a standard tier of API gateway. Is there a concurrent call limit? Sorry trying to scan through documentation didn't find one straight answer.
One more question, what is the simplest way to track the request and response the API gateway generates? Thanks
Adding the header Ocp-Apim-Trace: true to a request will return a link to a complete trace of the request and respond. This only works if you are using a subscription key for an administrator user.

Why chrome browser is changing endpoint frequently

I’m developing chrome push notification for my web site and doing the development in localhost (local machine) environment. Sending push notification is success with specific endpoint which I got when I subscribe the notification first time. I use same endpoint for all push messages.
Here sometime push notification got failed due to endpoint mismatch. When I see in chrome console (debugging mode) there was different endpoint.
Why chrome browser is changing endpoint? In this case how do we handle this scenario and update the new endpoint in the db?
sample endpoint:
https://android.googleapis.com/gcm/send/AWERdvfdfdsfdobRH4zlXGuyeuie3543uTBuP6air5dzZfltNa-FKF6K6S-9P5SdfbCbyvn9RdsfsdvU1XwSBwIrekjdK6_i4Cg-5rZAj8UvL1s-Bbr61yvvt_y2Hg9RdsyV
when i check next time, above endpoint got changed as like below
https://android.googleapis.com/gcm/send/reytryMkQwtY:YTUNMdsjjfhsdf349851VS6McDE7s_GITe_djsgfdkjghcdfdfgdftrkddfdsXiwX1vP_XclmDqrKPOAMJDfsYYXdhMX164694Q&ksdhfksdfhkjfhksdcndsk
Thank you.
The push notification endpoint is dependant on the service-worker. When a service-worker is unregistered and created again, the PushManager.getSubscription() method will indeed return null. You then need to call subscribe() again, which will return a new endpoint.
If you server tries to send a push notification to the first endpoint after the service-worker was unregistered, you will get a NotRegistered (for Chrome) or a Gone (for Firefox) error. So make sure to register the new endpoint as soon as the app loads or the device may become unreachable.
Note that this does not seem to affect service-worker updates.