How to generate api access token by calling rest api

Hi all, I want to generate api access token by calling frappe rest api through postman.
I tried with this url http://localhost:8000/api/method/frappe.core.doctype.user.user?user=“user_name” but i’m getting permission error.