Why it is throw error "Failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password)"?

The error is telling you that the database does not know of a user example_api or that it does exist and the password is not example_api.

Did you create a use for the database with that name?

The error is pretty clear that a connection was established at a network level so you shouldn’t have to make any changes to the Postgres configuration.