title: Full authentication is required to access this resource error message with Axios in React-native app
body: <p>Tried to get accesstoken from Restful API (Axios with React-native), however, only to get errormessage:</p>
  
  <blockquote>
    <p>"error": "unauthorized","error_description": "Full authentication is
    required to access this resource"</p>
  </blockquote>
  
  <pre><code>function accessToken(){
  
      axios({
          method: 'post',
          url: 'myurl',
          headers: {
              'Content-Type': 'application/x-www-form-urlencoded',
              //'Access-Control-Allow-Origin': '*',
          },
  
          data: {
              client_id: 'myid',
              client_secret: 'mysecret',
              grant_type: 'client_credentials'
          },
  
  
      })
          .then(function(res){
  
              console.log(res);
              console.log(res.data);
  
          })
          .catch(function(err) {
  
              console.log(err);
              console.log(err.response.data);
              console.log(err.response.status);
              console.log(err.response.headers);
              console.log(err.request);
              console.log(err.message);
              console.log(err.config);
          });
  }
  
   Object {
  
     "error": "unauthorized",
  
     "error_description": "Full authentication is required to access this resource",
  
  }
  </code></pre>
  
  <p>401</p>
  
  <p>I tried to get accesstoken from Restful API made of Oauth. However I only to get error 401 with </p>
  
  <blockquote>
    <p>"Full authentication is required to access this resource".</p>
  </blockquote>
  
  <p>I already tried to </p>
  
  <pre><code>   add 'Access-Control-Allow-Origin': '*' in headers,  
     base64 encode id and pw,
     add withCredential : true and false,
     create instance with axios.create.
  </code></pre>
  
  <p>Here is example usage of the API.
  the other functions which I made with Axios in React-native work well, however only this function which is supposed to get accesstoken does not work.</p>
  
  <pre><code>curl -X POST \
  
  http://api_domain:port/oauth/token \
  
  -H 'Cache-Control: no-cache' \
  
  -H 'Content-Type: application/x-www-form-urlencoded' \
  
  -d 'client_id=00002&amp;client_secret=gateway-api-secret&amp;grant_type=client_credentials'
  </code></pre>
  
  <p>Thank you in advance.</p>