I am looking at wanting to create a custom document provider to integrate with Microsoft Teams.
I have looked through the code samples here but cannot find anything that would do this.
https://learn.microsoft.com/en-us/microsoftteams/platform/tutorials/code-samples
Looking at this link, it quotes:
You can always add more cloud storage from other services. Additional services and integrations are available under the “Apps” menu, which you can access by clicking the “Apps” icon in the bottom-left corner
This would suggest to me that you can build third party document providers, but without any documentation or examples I am stumped on how to do this.
https://www.howtogeek.com/661374/how-to-add-third-party-cloud-storage-in-microsoft-teams
Related
I am required to create a share feature (like the one in Sharepoint or OneDrive) for documents, items and folders, for Sharepoint online and on-premise, in a Xamarin app.
What I have:
Sharepoint REST API.
Xamarin app connected to a Sharepoint online and on-premise server.
Sharepoint content is available in Xamarin app and user can select the option Share item which I have to implement.
What I need:
The logic to implement to be able to create the shareable link and actually share it like the Sharepoint website online does it (check screen shot).
#Mohamed Aloui,
You could have a try the below endpoint to create a sharing link:
/_api/Web/Lists/GetByTitle(‘Documents’)/Items(1)/sharelink
or
/_api/web/GetFileByUrl(#v)/ListItemAllFields/ShareLink?#v='/sites/testsite/Mylib/test.txt'
You can get an example through F12 tool:
Below is a tutorial blog and a similar thread, you may take a reference:
How to create a shared link with an expiration date for the item of OneDrive For Business via Rest API?
https://learn.microsoft.com/en-us/answers/questions/84801/calling-the-sharelink-sharepoint-rest-api-endpoint.html
BR
My local school allows me to log in to their online portal and access an email account using Outlook 365 within the browser, despite the fact I do not have a license for outlook/office 365.
Is it possible to create a web application where users of this app could click a link to edit a document directly in their browser using Word 365, with us/the developers of such app being the licensee of Word and not the end-user? The remote document would be held in a Sharepoint/Webdav capable service.
If this is possible, which MS-technologies should we investigate to develop such a system? Is it the MS-Graph API or something else?
A pointer in the right direction would be greatly appreciated.
Thanks!
You can use the Graph to create a sharing link to a document. But the user will have to sign in to view the document I believe. I'm not sure what licensing they need but you can try this with your users to see.
https://learn.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0&tabs=http
You can use the Google Docs API to work with documents stored in Google Drive. If you are using Java there is a "Quickstart" at the following link:
https://developers.google.com/docs/api/quickstart/java
Slack offers Box/DropBox/Google integrations, specifically the ability to add (pick via a dialog) a file to Slack from one of these offerings.
I have tried my best look up the different sort of integration possibilities but cannot find any documentation that I can leverage to build my own (to another product).
How does one go about providing a similar integration for his product?
The reason you do not find anything on how to create integrate products similar to Google Drive and Dropbox in the official API documentation is that those are custom solutions created in collaboration between Slack and vendors like Google. If you want something similar for your product I would advise you to contact the Slack business team for details.
However, there is one feature in the API that allows you to create some of the functionality:
Slack app unfurling: Automatically add custom attachments whenever a user posts a message which contains a URL to your product. Those can include preview images and text of your product.
I have created a web application which connects with Google APIs. In the past it only connected with the Google Analytics API. Now I am making it link with Google Webmaster Tools (GWT). Some of my existing users may want to opt in to GWT. And moving forward new users may want to link with just one or both APIs.
Is it best practice to create a separate console project for each API?
During experimentation I modified my original Google Analytics project to support GWT. But in doing this I found there is no way a user could revoke access to just one API; they would need to revoke BOTH APIs.
I then created a separate project to manage just GWT. This works fine and all. But from the user's perspective it makes another entry into their "Connected Apps" (see screen shot).
What is the best practice for a situation such as this?
what key (if any) do I require for simple text translation from program?
Note: I don't host any website.
Getting a Google Translate API Key
To use the Google API, you first need a Google Cloud account.
Go to https://cloud.google.com/translate/docs/basic/setup-basic
Click Set up a project.
Name the new project in the Enable Cloud Translation API screen. Use this dialog to name your project
They may ask you to create or connect to an existing billing account. Google gives you a $300 credit to use the Cloud Translation API over a year to try it out.
Create a new service account.
This screen will pop up with your new project name and the associated service account. Click Download Private Key. This API key (written in JSON) connects your site to the Google Cloud. To enable API, download the private key.
Upload the Google Translate API key to your site. Check with your hosting company where on your system to place this key.
When you’ve placed the Google API key on your site, tell your system where to find it. Set an environment variable. Again, check with your hosting company if you don’t know how to open a terminal.
API keys are the same for all GCP APIs. Instructions here: https://cloud.google.com/docs/authentication/api-keys
Activate the Google Translate API
Before you can use a Google API in your project, you have to activate it. Go to the side menu and select the APIs & Services option:
Now you will see a screen with statistics about the APIs that you have activated. If you created the project from scratch by following the steps above, you won’t have any data yet, as you can see:
Click on the upper button Enable APIs and services to continue with the activation process of the API. This takes us to a search box where we have to look for the API we’re interested in. In this case, we want to use the Google Translate API. Type translate in the search box and click on the result Cloud Translate API:
This brings us to a screen with the description of the Cloud Translation API. Click on the Enable button to activate the API in our project:
We already have the Google Cloud Translation API activated. We’re almost there…
Create a new API Key for Google Translate
After activating the API, let’s see how to generate a new Key API to be able to use this service. We have to go to the side menu again and select the Credentials option:
On this screen we see a button with a drop-down and the text Create credentials. Don’t click on the button! Instead, open the drop-down by clicking on the arrow to the right of the button and select the API Key option.
This creates the new Key API. You can copy it if you want, although you can access it later:
Google Cloud provides us with a new Key API to use Google Translate with our third-party applications.
How to Restrict Our API Key to Protect and Limit Its Use
To control the cost of Google Cloud by using the Google Cloud Translation API (or Google Translate, which is the same), we can do two things: restrict where you can use the API Key that we just created or limit the allowed quota to use the service itself.
In the screenshot above, if you click on the Restrict Key button you will go to the API Key restriction screen that follows:
There you can select to restrict the API Key by HTTP referrers, which means that you can only make calls to the Google Cloud Translate API using the API Key from certain domain names.
You must add the valid domain names in the text box that appears when selecting the HTTP referrers option. Sample domain name https://google.com/*.
On the other hand, go to the menu API’s & Services → Dashboard → Cloud Translation API → Quotas and there you will find a box called Characters. There you can modify the quota limits of the Google Cloud Translation API and reduce them, if necessary.
The price for Google Cloud Translation API at the time of writing this post is 20 USD per million translated characters, so make your numbers.
And that’s all! You already have your API Key ready to be used with the application you want. The process is a bit cumbersome at first, but following the steps you’ll get the API Key without problems.
An API key is required to use the Google Translate API and you can get yours from the Google APIs Console.
For further details, check the Developer's Guide.