How to request an API-key from an external App?

I’m Trying to request an API-key from an external app I’m building, so the APP can keep the secret key and use it to request data from ERPNext with the token, but at the moment i use the RPC URI the response I receive is the next:

It says not permitted, so to request an API-key i need a token which is made with an API-key and an API- secret…

Is there anything i can do?