Hi @Burnfireblaze,
Thanks for the interest in the libraries.
This is the error^
This looks as if you were provided a wrong creds or a wrong strategy.
Is it SharePoint Online or Onprem?
sp-download examples
https://github.com/koltyakov/sp-download#minimal-setup-typescript
It's just it. There could be no other examples. sp-download is a bare minimal one use case lib and cli.
In tests, there is a bit more, https://github.com/koltyakov/sp-download/blob/master/test/integration/tests.spec.ts, yet in terms of examples it's the same exactly pattern.
sppull
The different examples can be checked in the manual tests https://github.com/koltyakov/sppull/tree/master/test/manual
Or in integration tests.
While you're experiencing the issues with a straightforward scenario which just works for others, my guess you're providing a wrong path to site or folder or file, or wrong creds or strategy.
Please check this wiki for the auth strategies https://github.com/s-KaiNet/node-sp-auth/wiki
I'd suggest separating a possible issues by checking auth first - https://github.com/koltyakov/node-sp-auth-troubleshoot - this project setup allows quickly check if auth works. Don't try populating config manually, but use the wizard and then check what the private.json ended up with.
node-sp-auth
package and I am hoping to get some help here hopefully.getAuth()
with client_id
and client_secret
only, everything seems to be working ok (in that I don't get any errors back), but when the promise resolves, the access token comes back as undefined, so the "headers" object looks like this: {'Authorization': 'Bearer undefined'}
.This is an exact replication of the error