Running Collection with Json body file working fine, Newman having problem

I have postman collection that is running perfect that sending the complete file json as body of the request by running it and selecting the json file.
but when executing with Newman is not working fine, I am putting the -d filename with it giving me error 401 (same as running the collection without selecting the file).
any help please.
what I am missing here?


Hi @Fathalla

This thread looks like it answers your question…

Thanks.
I added the variable in the environment,
export it,
and executed with the -e Environment along with the -d File


still having problem.
which variables missing?

whats the full command you run for newman?

Thanks its worked I don’t know why I have to send the request twice, one failed, the other one succeeded !