How to access geolocation information in a Teams bot - geolocation

Geolocation is listed as a device permission option, but none of the examples in the bot framework repository on GitHub explain how to use it. I also can’t find information in the documentation. Am I missing it? I don’t understand why the permission exists if it can’t be used, so I’m not sure what to do.
I’ve inspected the incoming data from POST requests to see if latitude and longitude are included. No geolocation/location/GPS data is visible even though the manifest includes geolocation in the devicePermission list.

It's not supported to use with bot framework. You can access location using tab or task module. See the following note in documentation: You can use Microsoft Teams JavaScript client SDK, which provides the tools necessary for your app to access the user’s native device capabilities.

Related

Find source of Google My Business API request

We are setting up Google My Business using the following oauth instructions.
https://developers.google.com/my-business/content/notification-setup
However, there seems to be a process somewhere that keeps changing the settings and sending the notifications to a different pub/sub topic. So basically it appears to be making a PUT request to :
https://mybusiness.googleapis.com/v4/accounts/{accountId}/notifications
Is there a way to determine the source of the request ? There does not seem to be any instructions on how to access Google My Business API audit logs.
You should check who else has access to that location group, ideally through the GMB UI as that can give you an e-mail address hint:

OAuth2 with cloud services on devices with limited input capabilities

I'm new to the OAuth Authentication process so be gentle:
Goal: To create an embedded application on a device that will integrate with Google Drive, Dropbox, One Drive, Box to retrieve & store documents. This can be easily accomplished with OAuth2 authenticaiton.
Problem: The devices have limited input capabilities (and no browser) that prohibit users from being directly redirected, for them to input username/pass on the device.
Research: I've noticed looking through the documentation for these APIs that Google provides something called OAuth2 For Devices which allows the device to request a "User Code" when they first attempt to use the application on the device. The user can then go to a computer, navigate to a specific URL, and input that code to authorize the device to access their account. This circumvents to need for user input, or a browser at all, on the physical device.
Question: Do Dropbox, Box, OneDrive, or any others allow for this type of functionality, or anything comparable? As far as I can tell Google is the only one supporting this type of workflow.
Recently i've researched the same question and i've found out that while Google Drive Api supports OAuth2 flow for limited devices, it supports a very limited set of scopes. It means that Drive api for limited devices can offer only application data synchronization (files uploaded by app), because it won't find any files created by the user (outside of application, i.e. from web) even in a dedicated application folder. (assuming that user understands that application owns that folder and everything placed there ideally should be accessible by that)
By 2022, i've found the most promising api is from Koofr which doesn't have such limitation for devices and bundles multiple cloud services into one package.
Their documentation doesn't mention support for limited devices, yet it's fully working and can be found in their online HTTP api test suite.

Google's Web Service API via iOS requires a server?

I've seen in a few tutorials that Google's Places Web Service API is prohibited from being used directly from a mobile device. Is this still true?
I wouldn't call it easy, but after setting up a server key without any restricted IPs/Referrers, it seems to function just fine for me. I have searched quite a bit for official documentation from Google that specifies this to be the case, but I have yet to find anything concrete. I could see it being a good idea for additional security, but is it a requirement?
The Places API Policies document has a section Mobile Applications, but doesn't mention any restriction regarding using web service directly from a mobile device.
https://developers.google.com/places/web-service/policies

Does google maps need api key for IOS application (and why)

I saw in this link
http://codewithchris.com/iphone-app-connect-to-mysql-database/#connectiphonetomysql
Mr. Chris uses a google map without a key.[I've tried it and it's working]
but, when i enter google developer
Here: https://developers.google.com/maps/ios/
they say [get a key].
(why should i do it? i got confused)
if it's required to run it in my app, how can Chris did it?
pre-Thanks ^^.
Yes Google map needs API key, without API key your request will be failed.
WHY: Every app is unique with its bundle ID, API key provided by google is used to identify the app uniquely.
There are so many paid services are offered by google to used in our app, App id used to manage your account based on request to API made/ package selected by you.
It also helps you to analyse use of google API through your app, which may may help you plan out your furthuer updates/usage to your App.

Google Places API: iOS key: Request Denied [duplicate]

I'm trying to make an Autocomplete field which should fetch cities as the user types, by using the Google Places API as described in this tutorial:
https://developers.google.com/places/training/autocomplete-android
You've probably found this question around many times before as I did, but none of the answers helped me. Here are the things you should know:
The URL is
https://maps.googleapis.com/maps/api/place/autocomplete/json?sensor=false&key=myKey&components=country:ro&input=whatTheUserTypes
Please don't reply by saying you replaced the API key with your own and it worked - the API key which goes there must be Android specific and won't work from a browser.
So did I make the Android API key using the SHA1 fingerprint obtained from the keystore I signed the app with.
I turned on Maps and Places APIs from the console.
The quota isn't exceeded.
All those and it still gives me REQUEST_DENIED
What I didn't mention is that I have O2Auth activated - does that change anything? Shouldn't it be as simple as putting the API key in the app?
Thanks!
Although this has been answered, I think the community could do better.
I was tearing my hair out about this, it just didn't make sense to me.. I was making an iOS/Android App, so I made an iOS/Android Key...
Wrong.
With Google's Places API, your bundle identifier isn't even considered.
What you really want to do is this:
(I'm using the new User Interface)
1. Log into https://cloud.google.com/console#/project
Select your Project Name, then go into API's & Auth > APIs
Make sure you have Places API Turned on. This is the only thing that needs to be turned on for Places-API to work.
2. Go into Credentials
Click CREATE NEW KEY under Public API Access
3. Select BROWSER KEY
4. Click Create, Nothing Else
Leave the HTTP Refer box empty.
5. Use the Key Generated here
This key will allow ANY user from any device access to the API via your Developer login.
You can try it out here: (Be sure to replace YOUR_KEY_HERE with your generated Key)
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Food%20Sh&sensor=false&radius=500&location=0,0&key=YOUR_KEY_HERE
6. Enjoy
Now you can use that URL above in your Android/iOS device.
The Google Places API does not currently support Android or iOS keys generated from the Google APIs Console. Only Server and Browser keys are currently supported.
If you would like to request this support, please file a Places API - Feature Request.
https://developers.google.com/places/training/autocomplete-android
Storing your API key
Although the above code demonstrates how to communicate directly
between an Android app and the Places Autocomplete service, you should
not store your Places API key with your app.
You should therefore build a web application that stores your API key
and proxies the Places API services. In order to secure communication
between your Android app and the proxy web service, you should require
user authentication to your proxy web service. Your Android app can
securely store user credentials and pass them to your web service, or
the user can log into your web app via an Android WebView.
For the latter approach, your web app should create and return a user
authentication token to your Android app, and your Android app should
subsequently pass this token to your proxy web service.
Go to google cloud platform console>Credentials click on edit by selected your YOUR_API_KEY>Application restrictions > select none option>save thats it.
If you select the android apps option from Application restrictions then google deny the place API with exception REQUEST_DENIED.
In Google dev console, you should be able to find both "Places API" and "Places API for Android"
Make sure to use "Places API for Android"
For some reason, "Places API for Android" is hidden in the API list, but can be accessed using search.
I had the same issue , I fix it by leaving
Accept requests from these HTTP referrers (web sites) (Optional)
in browser key Empty
I am still new, so I cannot comment, but to shed some light on Moe's answer, I resolved some similar Google Maps API issues regarding URL queries (for directions, using Volley) with the following steps:
Get Android API Key (including Google Maps Directions API in my case).
Get "Server" API Key (which seems to be created by using a key restriction of "HTTP referrers" these days - really, it's just used to issue URL queries through HTTP).
Store the Android API key as a meta-data tag in the application tag in AndroidManifest.xml with android:name="com.google.android.maps.v2.API_KEY" and android:value as your key. This is used for direct interaction with the Maps API (minus URL queries).
Use the server API key whenever issuing URL queries.
I am not sure if this also applies to URL queries for the Places API, if you only need the server API key, or if there is a better solution, but this worked for me.
I imagine that it works with just the first key - the one not restricted to Android.
Inside Google Cloud Console type Places and Activate it. Create an API Key and insert it onto your Android Studio App as you would do normally. That`s it.
I had the same problem. For me the key was to enable billing on project. I am still using "Applications for Android" restrictions. After setting up the payment method, Places Api started working.
Prior to using the Places SDK for Android, do the following:
Follow the Get an API Key guide to get, add, and restrict an API key.
Enable billing on each of your projects.
Enable the Places API for each of your projects.
See it there.
Be sure also to check out the billing plans for the Google Places API as it is not free!

Resources