REST API for creating a personal access token

Is it possible to create a personal access token via the REST API?

I have not been able to find an endpoint for it in the docs despite the octokit.rb docs suggesting that this is possible with Octokit::Client::Authorizations. Indeed I get a 404 when I try to use it, so maybe this endpoint was removed? There is also a post here on the forum that uses it.

It has been removed in line with disabling password authentication for the API, see here: Deprecating OAuth Authorization API | GitHub Developer Guide