DESCRIPTION
This error you must be getting while making query developer console OR query using api. It’s because of fact that you don’t have permission to access org using API.
SOLUTION
If Issue is taking place in developer console
Quick way to fix it to give permission “Use any API client” using profile or permission set.

NOTE: If you do not find “Use any API client” then try to enable the permission “API Enabled”.
If you are using connected App
This is happening because of connected app is not configured correctly.
On ‘API (Enable OAuth Settings)‘ panel, move ‘Access and manage your data (api)‘ option from left to right of Selected OAuth Scopes field and then save the setting.

TIP: Wait for few minute and then try. It should work.

Greetings! Very helpful advice in this particular article!
It is the little changes that will make the
most significant changes. Thanks a lot for sharing!
I am pleased that I detected this web blog, just the right information that I was searching for!
Well composed articles like yours renews my faith in today’s
writers.You’ve written information I can finally agree on and
also use.Many thanks for sharing.
Nice post. I was checking continuoysly thnis bloig aand I’m impressed!
Very useful information specially thhe last part :
) I care foor such info a lot. I was looking for this particular information for a long time.
Thank yyou and best of luck.
Very nice post. I just stumbled upon your bblog and wanted to say thaqt I’ve truly enjoyed surfing around your blog posts.
In any case I wijll be subsribing to your fee and Ihope you write again very soon!
I think thiks is one of the most important information forr me.
And i am glad reading your article. But wanna remark on few general things, The web site style is perfect, the articles is really great!
What’s up, I wish for to subscribe for this blog to tak most recent updates, so where can i do it please hekp
out.
I like it whenever people come together and share thoughts.Great website, contiknue the good work!
You need to take part iin a contest for one of the most useful websites online.
I will recommend this site!
Hello all, here every person is sharing such know-how, so it’s pleasant to read this website, and I used tto go to ssee this website daily.
Hi there! I could have sworn I’ve been to this blog before but ater
browsing through some of the post I realized it’s new to me.
Nonetheless, I’m definitely delighted I found it and I’ll
be bookmarking and checking back frequently!
site
Would love to perpetually gett updated outstanding web blog!
I think this is among the most important information for me.
And i’m glad reading your article. But should remark on some
general things, The web site style is great, the articles is really excellent : D.
Good job, cheers
These are genuinely enormous ideas in on the topic of blogging.
You have touched some fastidious things here.
Any way keep up wrinting.
Very energetic blog, I enjoyed that bit. Will there be a part 2?
Hello all, here every person is sharing such know-how, so it’s pleasant to read this website, and I uxed to go to see this website daily.
I just like the helpful info you provide on your articles.
I’ll bookmark your weblog and test once more here regularly.
I’m fairly certain I’ll be informed lots of new stuff
proper here! Good luck for the next!
Greawt looking website. Assume you did a great deal of your very own coding.
I have found very interesting your article.It’s pretty wortfh enough
for me. In my view, if all website owners and bloggers
made good content as you did, the web will
be a lot more useful than ever before.
Hello! Do you use Twitter? I’d like to follow yyou if that
would be okay. I’m definitely enjoying your bloog and look forward ttoo neww articles.