Access Netlify API from build plugin

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 https://github.com/netlify/js-client/issues/86

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.

Never mind, I found https://github.com/netlify/build/issues/585 and understand that this feature is on hold.

1 Like

Hi @william,

Yes it is! This issue is tracking our progress: https://github.com/netlify/build/issues/557
Stay tuned!