title: Login with postman with xray cloud API
body: <p>I have problems with Postman and xray cloud API
  I seek on THE WEB and I have some errors because of the authentification. I try to fix it on postman but I don't find the correct way. I use API token and I see that a lot of users use mail: API encoded on base64 on the header. I don't see how in the API how to settle this.</p>
  <p>If someone has a way or a tutorial with clear path</p>
  <ul>
  <li>I have this on my prerequest script. I use for client id and client secret an API token create for JIRA xray.</li>
  <li>My user is admin</li>
  <li>I've got with a post request with authenticate a status 200 OK with an authorization token but for the others request I have all ways the error beside</li>
  </ul>
  <p>For example GET <code>{{JIRA_BASEURL}}/rest/api/2/project/{{PROJECT_KEY}}</code> (when I put directly this request on a navigatot I have a response) but with postman</p>
  <pre><code>    &quot;errorMessages&quot;: [
          &quot;No project could be found with key 'SCRUM'.&quot;
      ],
      &quot;errors&quot;: {}
  }
  </code></pre>
  <p>My prerequest script</p>
  <pre><code>pm.sendRequest({
      //url: pm.environment.get(&quot;api-url&quot;) + 'v2/authenticate',
  url:  'https://xray.cloud.getxray.app/api/v2/authenticate',
      method: 'POST',
      header: {
          'content-type': 'application/json',
          client_id: pm.environment.get(&quot;client_id&quot;),
          client_secret: pm.environment.get(&quot;client_secret&quot;) 
      },
      body: {
          mode: 'raw',
          raw: JSON.stringify({ client_id: pm.environment.get(&quot;client_id&quot;), client_secret: pm.environment.get(&quot;client_secret&quot;) })
      }
  }, function (err, res) {
      pm.environment.set(&quot;AUTH_TOKEN&quot;, res.json());
  });
  </code></pre>