Volver a todas las conversaciones
error 500

pittalavito1
2 years ago
I copied the code to get the token using (javascript)fetch but I get this error
“oautch2.0.js:24 POST https://bravenewcoin.p.rapidapi.com/oauth/token 500 (Internal Server Error)”
why?
Únase a la conversación, añada un comentario a continuación:
Inicie sesió/Regístrese para publicar nuevos comentarios
Hi,
It appears that the 500 response may be a CORS related issue. We can replicate the 500 by hitting the API by using the javascript fetch example code in a browser. Our dev team is evaluating the addition of the access-control-allow-origin header but you might need to explore alternatives in the short term.
Best regards,
Brave New Coin Support
Hi,
Thank you for the clarification that the issue is with the generated example code. We have escalated to our dev team to check we can replicate it and can advise on what’s causing the error.
Best regards,
Brave New Coin Support
yes if I use an xlm (js) request I get the tokem, but for my university project it is necessary to use the fetch (js) and with this method I always get an error 500
Hello pittalavito1,
Checking the logs we can’t see any 500 errors for your requests. Overall we see an extremely low number of 500x errors from any users (6 in last seven days of over 3.3 million calls) so must assume that was a temporary glitch. We can see that your recent token requests have been successful.
However we can see that you have got some 401 errors calling the AssetTicker endpoint. It appears this is because you have not provided the UUID of the cryptocurrency asset you are interested in. The assetID is a required parameter. You can find the UUID of an asset by using the Asset lookup endpoint where you can supply an asset’s symbol as an optional parameter.
Hope that helps you get going!
Best regards,
Brave New Coin Support