Fetching XLSX data from Microsoft Sharepoint in a React/NodeJS request - javascript

I am trying to fetch data from a business Microsoft Sharepoint domain, in one of the locations it has a stored XLSX (excel) file that I need to analyze and upload to a database.
If I send a request via postman to the URL of the XLSX file I get a 403 forbidden (obviously I'm not authenticated)
So I'm trying to access an XLSX file stored on Microsoft Sharepoint and I need to authorize myself before I can access it with either react or nodejs.
Example URL: https://[ORGANIZATION_NAME].sharepoint.com/:x:/r/teams/[ORGANIZATION_TEAM_NAME]/_layouts/15/Doc.aspx?file=[FILENAME].xlsx
I am not sure where or how to authenticate myself with sharepoint to programmatically access that file. I searched and found many packages such as React-PNP, but I wasn't sure how to implement them to do what I wanted.

According to my research and testing, you can use App-Only authentication to authenticate to SharePoint Online. In App-Only Authentication we need to create the "client-id" and "client secret". Please follow the steps in the following article to authenticate to SharePoint Online and grant access using SharePoint app-only: https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs
Also, if you want to fetching Data using React, you can refer to this document: SharePoint Framework - Fetching Data In React
Hope it can help you. Thanks for your understanding.
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

Related

How do I connect my react website to google drive to store uploaded files

I have a file upload in place however I want to go ahead and send my files to google drive to be stored however I'm not sure where to start and everything I've seen so far online has been a bit confusing. Does anyone have any tips?
This is a pretty broad question, your best bet is just to read Google's documentation and code samples to understand how the process works.
Learn how Google uses OAuth 2.0 to authorize APIs. This involves creating a Google Cloud Platform project to generate the access credentials. The Get Started guide contains the steps to create this project and set it up.
With the credentials you can generate a token to authorize your app to access Drive. Since you said that you are already uploading the files you'll probably want to do this on the back-end. There's a general sample for using OAuth with web applications and for something more specific you can check out the Drive examples.
You could also choose to do it on the front-end. Google has a different guide for that, and the code sample in Erwin's comment can help you as well to follow up after you have the authorization token. There's another guide in Github referenced in that link that can also help you generate the auth token.
My recommendation is to first really learn how OAuth works, here's a great question about it. Then use the links above to understand how Google uses it and their required steps, then try to implement it yourself little by little and look for, or ask specific questions if you get stuck in some step. Understanding the process is key to make it easier for yourself so you'll need to dedicate some time into studying it.

How to get the active version of a SAPUI5 application deployed in Hana Cloud Platform [duplicate]

I need to access the active version on SAP Cloud Platform of HTML5 apps through an api.
I know for the java apps you have the lifecycle api: doc
But you can't access HTML5 information with this API.
What I found is this service: https://account.hana.ondemand.com/ajax/getHtml5AppDetails/{subaccountName}/{appName}
This will return a JSON string with the required info, but I'm not authorized to access this page, although I have all the possible admin rights.
So I'm wondering If any of you has any idea to solve my issue, and other people's issues.
Well, we needed something similar and used this kinda hack to get the active versions via WebIde Api (need basic Auth to login) replace XXXX with your account
https://webide-XXXX.dispatcher.hana.ondemand.com/api/html5api/accounts/XXXXX/applications
You get back a json array with all your applications of that sub account, including active version and other interesting information
Hope it helps ;))
Regards Mathias
You could create a HTTP Proxy Servlet based on https://github.com/SAP/cloud-connectivityproxy that provides read only access to https://dispatcher.hanatrial.ondemand.com/hcproxy/b/api/accounts/<subaccount>/applications/<app> for your app.

Making a database application with just JavaScript?

I need to make a dead simple web application. Users hit a static HTML page and enter some basic info (name, and comment). When they hit submit, I want to store this info in either a CSV file or a sqlite on the hosting server. I know all of this is possible with django/python or ror/ruby but is there anyway to do this with just JavaScript?
Thanks in advance..
There's few ways to handle this, using just javascript. Which is to use a hosted Backend-as-a-Service.
You would need to make API calls on the client end, and will be able to connect to it without having to rely on a backend technology.
Most of these technologies are built for mobile, but you can still use it to build it on your static HTML pages. (cross browser issues may vary).
Here are some:
Firebase (https://www.firebase.com/docs/web-quickstart.html)
Parse (https://parse.com/docs/js_guide)
There's more out there if you google Backend as a service.
If you are looking for something more simple, just need to take information and store it (like a form), then I would suggest looking at these services:
Wufoo (http://www.wufoo.com/)
jotform (http://www.jotform.com/)
Hope it helps!

Trying to produce automated daily call reports through RingCentral either by webscraping or by emailing the .csv export

Since RingCentral (VOIP) phone provider does not provide any call statistic reporting, I am looking for an alternative.
I want to automate this as much as possible, and avoid having to go to the website everyday, send the report through email, open the email import the .csv into Excel and run the script.
I have believe I have two options here (correct me if you know of more):
Webscrape from Ringcentral.com
Create an email address to send automatic reports to daily. I then would probably use Python to access this .csv file, apply macro, and send results to another email.
I am looking for guidance on the best way to approach this problem. If someone would like to see how the data is embedded in the website I can provide the source code. It is JavaScript, which I am not familiar with.
Any suggestions are appreciated.
Thanks,
J
You can use the RingCentral REST API to retrieve Call Log Records in JSON format. This is available directly from the API and via the SDKs which includes both Python and JavaScript.
API Guide: https://developers.ringcentral.com/api-docs/index.html##GetCallLog.html
SDKs: https://github.com/ringcentral
As a note, the RingCentral Online Account Portal does provide some call reporting now, so if that works for you, there would be no development necessary.

How can I pull user's information from Renren using JS API?

I want to build a html form for a Chinese website. And I want connect that form with Renren social media using JS(JavaScript) API. So that user can submit the form via Renren log-in details.
Linked-In provides JS API, which supports the cross-domain policy, using that anyone can pull information from Linked-In at the client machine itself.
Similarly, I just want to know, is it possible to pull information from Renren using JS API which should support Cross-domain policy. I don't want to use any server-side API's.
I have tried the JS-Sdk from this link - http://wiki.dev.renren.com/wiki/Js-sdk-1.0
Using that I can only able to authenticate the user with Renren log-in details.
But I don't have a clear idea about how to pull the information from the current logged-in User.
I have tried AJAX calls also, but that is also not working because of cross-domain policy.
Could anyone please help on this?
For reference - Similar Kind of question has been raised in the below Link
Javascript RenRen API
I highly recommend using a 3rd party such as Gigya in order not to have to know every social network API signature. A lot of sites currently use it, such as Nike.com
You can get a free developer key and if you're working for money instead of non-profit, your client should be able to bill for it.

Categories