In order to access the response data, you need to use the res argument from the pm.sendRequest() function. This will allow you to grab the part of the response body you need and save this as an environment variable, to use in your other requests.
Iβve changed your code slightly to get the token value and set it as a variable.
pm.sendRequest('https://{{URL}}/token?id={{client_id}}&secret={{client_secret}}', function (err, res) {
if (err) {
console.log(err);
} else {
pm.environment.set("M_token", res.json().token);
}
})
I wrote a post a while ago about how to make this action of getting the token slightly more automated - Take a look at the code in the post, hopefully, it makes sense.
If you wanted to post some images and show me what you have at the moment (mask any sensitive information), I can hopefully try and see what the issue is.