I want to write a build plugin that accesses the Netlify API during onInit
. At the moment I am relying on the user providing a NETLIFY_AUTH_TOKEN
environment variable to get API access.
Then I read Do not expose API token · Issue #86 · netlify/js-client · GitHub
For example, Build plugins perform logic on behalf of the user. They receive an instance of the API client with the user’s access token.
Is this true? Do I already have some way to get an API client in my plugin? I didn’t see it documented anywhere.