You can login to Dhan Web, and go to your Profile section > "DhanHQ Trading APIs". In that section, you will find option to generate access token.

In case you are APIs for the first time, you will have to click on 'Request Access' and refresh the page. You will get the access within seconds and you can then generate your access token.