How to acess API rest/views using token or login? I have a Drupal 8 website. I need to access the list of articles using www.myexample.com/rest/views/articles.

I could get the token using curl --header "Content-type: application/json" -b cookies.tt --request POST "https://www.myexample.com/user/login?_format=json" --data '{"name":"myname", "pass":"mypassword"}'. 

How do I use cUrl to pass the token or user/pass and get 'rest/views/articles' in JSON format? 

I tried curl --header 'authorization: Bearer {D12G7AajU9NdUAb260zqwCimfdddR1Krg5}' --url https://www.myexample/rest/views/artigos/format?_format=json, 
but it returns an error. 

UPDATE

I follow the @Ismail Cherri suggestion, seems a progress in the question but give me back :

"message":"The used authentication method is not allowed on this route."


In drupal website the config : 

/entity/view/{view}
is set to : 

GET
formats: hal_json, json
authentication: basic_auth


and 
/entity/entity_view_mode/{entity_view_mode}
is set to : 

GET
formats: hal_json, json
authentication: basic_auth


anyone could help?
First of all, does your endpoint require authentication to begin with? 
If yes, then use this https://www.drupal.org/docs/8/core/modules/rest/3-post-for-creating-content-entities as a guide though it is for a POST request. 



UPDATE
You need to know which authentication method are you using, e.g. basic_auth, cookie, Oauth, etc?
According to the method, you should formulate your request. The use of X-CSRF-Token is for Cookie Authentication.
It might be in your case that you successfully got the token, but you're using it on an endpoint which requires Basic Auth.
As I see in your posted REST configuration, you're actually using Basic Auth, thus your request should look something like this:  

curl --request GET \
  --url http://example.com/entity/view/{view} \
  --header 'authorization: Basic HASH_HERE' \
  --header 'content-type: application/json' \