0

I'm having some trouble figuring out how to get data from the _vti_bin/listdata.svc on my sharepoint online site.

Essentially I am trying to fetch the data in this listdata.svc file to then insert it into an s3 bucket. I've tried making a get request to the url but get a 403 Forbidden error, I'm assuming this is because I did not provide any credentials with this request. How can I provide my credentials so SharePoint can allow the request?

Here's a sample of the code that makes the call:

axios.get('https://site.sharepoint.com/sites/test/_vti_bin/listdata.svc/etc')
        .then((response)=>{
            console.log(response.data)
        })
        .catch((err)=>{
            console.log(err);
        })
0

You can use node-sp-auth. I've used it before and it's really simple to use.

https://www.npmjs.com/package/node-sp-auth

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.