Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 forbidden when using the search #27

Open
AoDev opened this issue Jul 4, 2019 · 3 comments
Open

403 forbidden when using the search #27

AoDev opened this issue Jul 4, 2019 · 3 comments

Comments

@AoDev
Copy link

AoDev commented Jul 4, 2019

Hello,

I could easily display the chart, nice work :) But I am getting 403 forbidden network error when using the chart search function (symbols).

I was wondering if this is something you have experienced although it's probably not the component itself but maybe some restrictions I am not aware of?

Screen Shot 2019-07-04 at 17 25 41

@rafaelklaessen
Copy link
Owner

Hi! Thanks for the issue. Unfortunately, I've never run into this before. I reckon this is an issue with the underlying library... Let me know if you can figure it out.

@AoDev
Copy link
Author

AoDev commented Jul 5, 2019

I investigated more since I posted. I am in contact with tradingview support but no success so far. (They say it's a problem on my side)

For the context, this happens in an Electron app. I am not sure but it seems related to some content / security policy. Maybe related to cross origin. I am a bit limited in knowledge here :P

If the app runs in a hosted website, everything works.

But, to reproduce the error, you can simply type this url in any browser.
This is what the tradingview library requests under the hood.

https://symbol-search.tradingview.com/symbol_search/?text=BTC&exchange=&type=&hl=true&lang=en&domain=production

So, depending on the context it seems the API will respond with a 403. I suppose they don't allow the API to be called from everywhere.

The only thing I could see are differences in the headers.

headers

@gauravsaini
Copy link

As an experiment try faking the request headers to match with that from the website and check if you get any response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants