Postman Pre-request Script. request for /auth/oauth/token

I’m going to try my best to explain what my issue is right now. It’s a pretty complicated test for me being pretty new!

in my test, there are 2 sites and i start off the collection by getting an Auth token which I use for the whole collection. Now, for this test though I need to have an API call to a different site that uses a different Auth token. so I need to start out my test in the pre-request by generating a new auth token.

I’m trying to have a POST request to generate a new token in PreRequest script . this token needs to use Basic Auth with username and password and I’m not sure how i can add that into pre-request script. do i add my username and password in the header like so below? or what is the best practice for hard coding a call like this which seems to usually be the main request in testing

var createRequest = {
url: pm.environment.get(“baseURL”) + “/api/…/token”,
method: ‘POST’,
header: {
“Content-Type”: “application/x-www-form-urlencoded”,
"Authorization": {
** username: “username”,**
** password: “password”},**
“Accept”: “/