How to set Origin URL on a UberRUSH app
<p>I need to make calls to the UberRUSH API from a webapp directly from the browser using javascript.
I've created a developer account and a app set to use UberRUSH, but in the app dashboard I can't set an Origin URI to enable CORS.</p>

<p>This is the error I'm getting:</p>

<pre><code>XMLHttpRequest cannot load https://login.uber.com/oauth/v2/token.
Response to preflight request doesn't pass access control check: No
'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'https://localhost:3000' is therefore not allowed access.
</code></pre>

<p>Is it not possible to do this? do I need to use the server as proxy?</p>

<p>I've tried several solutions, but they were meant for the Rides API, in which you can set a Origin URI in the dashboard. e.g </p>

<p><a href="https://stackoverflow.com/questions/38468163/does-uber-api-work-with-a-local-environment-getting-access-control-allow-origin">Does Uber API work with a local environment? Getting Access-Control-Allow-Origin issue on my https://localhost</a></p>

<p><a href="https://stackoverflow.com/questions/29286835/getting-a-no-access-control-allow-origin-header-is-present-on-the-requested-r">Getting a &quot;No &#39;Access-Control-Allow-Origin&#39; header is present on the requested resource.&quot; Error</a></p>

<p>but nothing worked.</p>

<p>this is my code:</p>

<pre><code>$.ajax({
  type: 'POST',
  url: 'https://login.uber.com/oauth/v2/token',
  contentType: 'x-www-form-urlencoded',
  data: {
    'client_id': '...my ID',
    'client_secret': 'my Secret',
    'grant_type': 'client_credentials',
    'scope': 'delivery_sandbox' // I've tried with 'delivery' as well
  },
  dataType: 'json',
  success: function(data){
    console.log('success')
    console.log(data);
    console.log(m);
  }
})
</code></pre>