I have some issues trying to access google iot-core API from my remote server (hosted on Digital Ocean). The same piece of code could work on my local machine, and I ensured that even the service key was the same, yet there was no explicit message to point me in some general direction.
I'm not sure if this is an issue with the discovery API as I could get the proper response on my local machine using the curl command below but when i tried to do this on my remote server it returned a 404 error. Anyone experienced this before?
curl https://cloudiot.googleapis.com/$discovery/rest?version=v1
Google Cloud IoT API endpoint is:
https://cloudiot.googleapis.com/
The current version is v1 and it is available here:
https://cloudiot.googleapis.com/v1
The discovery doc for this API and this version is:
https://www.googleapis.com/discovery/v1/apis/cloudiot/v1/rest
You may find Google API Explorer a useful tool too:
https://developers.google.com/apis-explorer/#p/
Here is the API Explorer result for Cloud IoT API v1:
https://developers.google.com/apis-explorer/#search/cloudiot/cloudiot/v1/
Even with these endpoints, you will need to authenticate your curl requests before they succeed.
I strongly encourage you to consider using Google's SDKs (Libraries) for interaction with any Google service and for Cloud IoT for service management (munging registries, devices etc.).
Once your configuration is established, your devices should use either MQTT or HTTP.
Related
I'm trying to automate the Application Proxy configuration. I can create applications, and service principals and configure permission. But I can't find a way to configure the app proxy. I found this page https://learn.microsoft.com/en-us/graph/application-proxy-configure-api?tabs=http but it uses the beta version.
Are there any endpoints in the Graph API in the release version that I can use to configure app proxy or when is MS going to release the beta version?
As I can see the Azure portal uses the https://main.iam.ad.ext.azure.com/api API to configure the app proxy. Can I use this API in my automated process? If so, how can I obtain a token for this API?
I found that I can obtain a token using az account get-access-token --subscription $subscription --resource 74658136-14ec-4630-ad9b-26e160ff0fc6 but it doesn't work for me because I have to use oauth authorization-code-flow. Is there any chance to use this https://main.iam.ad.ext.azure.com/api API?
I found following endpoint as well but still I'm not going to pass the client username and password through my APP.
POST https://login.microsoftonline.com/{{tenatId}}/oauth2/token
resource:74658136-14ec-4630-ad9b-26e160ff0fc6
grant_type:password
username:{{username}}
password:{{password}}
Postman Request
Connected question
As mentioned in the document as the Application Proxy configuration is only supported in Beta version, you could a feature for the same for this feature to be available in the V1 release as well.
Raise a feature request here:https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform
Hi there I am writing an mobile application with flutter, for authenticating I need log in to our company mail server which uses exchange service for communicating, is there any dart package for exchange service?
Maybe this one will help https://pub.dev/packages/ews#-readme-tab- It is recently published.
Repository (GitHub) https://github.com/dmytro-glynskyi/ews
EWS #
This project is a Dart client library to access Microsoft Exchange web services. The library works against Office 365 Exchange Online as well as on-premises Exchange. By using it you can access almost all the information stored in an Office 365, Exchange Online, or Exchange Server mailbox. However, this API is in sustaining mode, the recommended access pattern for Office 365 and Exchange online data is Microsoft Graph
Getting started
In the library the ExchangeService class contains the methods and properties that are used to set user credentials, identify the Exchange Web Services endpoint, send and receive SOAP messages, and configure the connection with Exchange Web Services. To perform an operation by using the library, you must set up the ExchangeService class.
final service = ExchangeService.withVersion(ExchangeVersion.Exchange2007_SP1)
..Url = Uri.parse("https://outlook.office365.com/ews/exchange.asmx")
..Credentials = WebCredentials("---USER_NAME---", "---USER_PASSWORD---", "---USER_DOMAIN---");
Installing:
depend
dependencies:
ews: ^0.0.7
get package
$ flutter pub get
Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.
import it
import 'package:ews/ews.dart';
We have created our automation framework using Appium-TestNG in which we are accessing our backend servers through RestFul Apis externally. The backend server is also based on AWS and has whitelisted the device farm IPs. When we are executing the tests locally its working fine but when we execute it on AWS Device Farm, it is giving ‘Socket Exception’ when trying to access the backend servers via our apis.
Can anyone give us a solution of how to access external Rest APIS via Device Farm?
The IP range that's in the FAQ of Device Farm point to the devices but not the device host. The device host could have a wide range of IPs but there are two ways(that I've found so far) to get around this issue in theory:
Use the private offering from Device Farm.
If you have access to the private offering for Device Farm, you're able to use the VPC integration with both the devices and the device host. So there shouldn't be any white-listing needed using this method.
Use API Gateway's private VPC integration and call this API from the tests
When using the public offering(metered and unmetered options) we should be able to take advantage of API Gateway's VPC integration. Using an private NLB in the same VPC as the REST API we can create a VPC link. The ending architecture I believe should look like this:
Then we can secure the API using an API key or custom authorizers. So then we can call this API which links to the private REST API from the device host.
Note: This might not be the best workaround depending on the use-case as then the device host will have access to the API key.
Additionally(I know you didn't ask this but wanted to link to it anyway), the easiest way I've found so far to develop REST API calls is to use Postman to make a successful call to the REST API. Then use the code snippet feature to make the same calls in the support languages from postman.
Hope that helps
-James
i want to use google map api for route between two location. in my IOS application. i try create public key for project and enable uses API in developer console. but i got this error: this ip site or mobile application is not authorized to use this api key IOS. after this error i try create API key for Key restriction for (IP addresses (web servers, cron jobs, etc.)) and set my ip address and then routing is work fine. but when i try this from other device again and again i get this error.
i should use this URL for routing :
let url = "https://maps.googleapis.com/maps/api/directions/json?origin=\(origin)&destination=\(destination)&mode=driving&key=APIKEY"
how can solve this problem for working my code in all devices.
The API key that you use with Google Maps web service (Directions API) supports an IP restriction as mentioned in the following document:
https://developers.google.com/maps/faq#using-google-maps-apis
The issue is that you cannot know the IP addresses of all devices where your application is installed.
You have the following options:
Use unrestricted API key. Note that API key requires HTTPS connection, so the API key won't be intercepted from the request itself, because the request is encrypted. So, in this case you should procure that the API key is not put directly in your source code. If you can read it from config or the environment, it might be feasible.
Create an intermediate server. Your iOS application should send requests to the intermediate server, intermediate server should send requests to Google and pass responses back to your app. In this case you can restrict an API key by IP address of your intermediate server.
I hope this helps!
I am mobile iOS developer and need a demo environment while making a Proof Of Concept app that will run against SAP Mobile Platform 3.0 (SMP) and Netweaver Endpoint using OData service. I need to be testing against SMP Server 3.0 SP05 or SP06 as I need to work with Offline mode as well.
I have setup SAP HANA Cloud Platform Mobile Services on CAL (https://cal.sap.com), configured my application and can successfully execute user registration and on-boarding against the SMP. I am using one of SAP-provided Netweaver demo endpoints, but then I am getting http errors when further making HTTP requests from SMP to the Netweaver endpoint.
The SMP uses HTTPS protocol.
The Netweaver demo endpoint is at https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/
It gives me errors like:
Unable to extract request URI: URI must contain a port: https://hcpms-p1941221453trial.hanatrial.ondemand.com/com.sap.flight/
or
Cannot open tunnel with id account:///p1941221453trial
or
HTTPS proxying is not supported. Use HTTP instead. HTTPS is not needed because communication is already secured by the tunnel.
Can somebody please sugest the correct configuration of the end point - Authentication Type, Rewrite Mode, Proxy Type - to get the SMP working with the demo endpoint?
If it is not possible to connect to this NW endpoint from HANA Cloud SMP, can you please sugest another way how to get a demo NW Endpoint with one of SAP sample OData applications? Many thanks.
This may help you for a subset of your issues:
Regarding the HTTPS error, have a look here:
https://help.hana.ondemand.com/help/frameset.htm?9d0e9e8397f544d9a5de5df52fd1e757.html
It mentions: The communication between the XS application and the proxy listening on localhost is always via HTTP. Whether the connection to the on-premise back-end should be HTTP or HTTPS is a matter of access control configuration in the Cloud connector. For more information, see Configuring Access Control (HTTP).
Basically, when something goes through the Cloud Connector, the HANA server uses a the proxy localhost:20003 in HTTP