i tried to create user in auth0 api with nestjs but give me error with status 401 enter image description here
my code is:enter code here
@Post()
async create( @Headers() authorization: string, @Body() User: any) {
try {
// @ts-ignore
const response = await axios.post(process.env.AUTH0_USER_CREATE, authorization, User);
// tslint:disable-next-line:no-console
console.log( authorization, User);
return response;
} catch (error) {
// tslint:disable-next-line:no-console
console.log( error, authorization, User);
return error;
}
}