Why do LUIS app lose endpoint key if I use it in several apps? - azure-language-understanding

I have several LUIS apps, 6 normal and 5 dispatch. I assign the same endpoint key from a cognitive service en Azure to all of them. But it seems that there are always two that end up losing the resource somehow.
Couldn't find any documentation about a limit on how many LUIS apps can use the same endpoint at the same time.

You can assign the same subscription key/endpoint key to multiple LUIS apps assuming they are in the same region. Also, the authoring key in LUIS.ai is not the same as the endpoint LUIS subscription key in portal.azure.com. The authoring key allows you to author any LUIS app and the endpoint key allows you to query any LUIS endpoint. The endpoint key allows a quota of endpoint hits based on the usage plan you specified when creating the key. This gives you a detail on the key limits for different subscriptions.

Related

How to process RTDN from Google Play?

My server receives a real-time developer notifications (RTDN) from Google Play. Now what?
How to check whether RTDN by Google Play comes from Google, not from a hacker? Suppose I use purchases.products.get API to check it. Then a hacker could send me repeated RTDN, what would lead my server into thinking that purchase happened two times (when it was really one time).
I want my server to top the user account on every purchase from my app. I want the amount of purchase to be arbitrary (specified by the user). Should I include the amount in dollars into product productId/SKU like: credit-$0.78?
Also, it is unclear how to determine the installation ID of the app (a UUID I store in app data on installation) for which the purchase was done. Should I include the UUID in productId/SKU?
Quoting https://developer.android.com/google/play/billing/security
A special case of sensitive data and logic that should be handled in the backend is purchase verification. After a user has made a purchase, you should do the following:
Send the corresponding purchaseToken to your backend. This means that you should maintain a record of all purchaseToken values for all purchases.
Verify that the purchaseToken value for the current purchase does not match any previous purchaseToken values. purchaseToken is globally unique, so you can safely use this value as a primary key in your database.
Use the Purchases.products:get or Purchases.subscriptionsv2:get endpoints in the Google Play Developer API to verify with Google that the purchase is legitimate.
If the purchase is legitimate and has not been used in the past, you can then safely grant entitlement to the in-app item or subscription.
[skipping about verification of subscriptions]
Real-time developer notifications (RTDN) is a mechanism to receive notifications from Google whenever there is a change in a user's entitlement within your app. RTDN leverages the use of Google Cloud Pub/Sub which is encoded and secure, each publish made to a Cloud Pub/Sub topic contains a single base64-encoded data field.
Note: You must call the Google Play Developer API after receiving Real-time developer notifications to get the complete status and update your own backend state. These notifications tell you only that the purchase state changed. They do not give you complete information about the purchase.
The Google Play Developer API is a server-to-server API that complements the Google Play Billing Library on Android. This API provides functionality not available in the Google Play Billing Library, such as securely verifying purchases and issuing refunds to your users.

How to get the get API path and parameters of Google play developer API?

I have added a non-renewable subscription for one of my projects. We also started implementing the Google play developer API to get the subscription latest status from the Play Store. For that we have done the below steps as per this blog:
Linked the developer account to a new Google Cloud Project.
Enabled the Google Play Developer API for the Google Cloud Project.
Created a service account and created a key for the service account.
I have below clarifications related to this implementation:
I tried to Grant Access for the following permissions: But the corresponding checkmark is not clickable.
View financial data, orders, and cancellation survey responses
Manage orders and subscriptions
The 3rd step as per the blog is to Authorize an API key, but I didn't get a clear idea of that.
We are going to implement this API on the back end side as a corn job, do we need to generate a JWT token for accessing this API? Is this possible to call without a Token? I found 2 types of implementations from this blog, which one is easy and secure?
"Your application can complete these tasks either by using the Google APIs client library for your language or by directly interacting with the OAuth 2.0 system using HTTP."
From where we get the get API path and other details. I found a similar get API from AppStore like this. Is the play store providing a similar kind of get API?
We need the latest purchase status API and for that what parameters do we need to pass?

How to add a Prediction Resource to LUIS app programmatically

I am using C# SDK to create the LUIS apps with required Intents, Utterances and Entities, and then training and Publishing the apps using an Authoring key created in Azure portal. After this, I use the REST Prediction endpoint for Intent matching, and till now I used the free Starter Prediction Key. After a month since the Starter key gets expired, I created a Cognitive service in Azure to be used as the Prediction resource. Now, how to add this new Prediction resource(Cognitive service) to my LUIS apps via SDK or REST? I am able to do so from LUIS Portal though, but don't want manual intervention.
Once you create the prediction endpoint resource, the resource should be only used for endpoint prediction queries and not for authoring changes to the app. If you want to add the prediction resource to your app by not going through the portal and automate the assignment of the resource to a LUIS app for purposes like CI/CD pipeline, then you can follow the steps below:
Get an Azure Resource Manager token from this website. This token does expire so use it immediately. The request returns an Azure Resource Manager token.
Use the token to request the LUIS runtime resources across subscriptions, from the Get LUIS azure accounts API, which your user account has access to.
This POST API requires the following settings:
This API returns an array of JSON objects of your LUIS subscriptions including subscription ID, resource group, and resource name, returned as account name. Find the one item in the array that is the LUIS resource to assign to the LUIS app.
Assign the token to the LUIS resource with the Assign a LUIS azure accounts to an application API.
This POST API requires the following settings:
When this API is successful, it returns a 201 - created status.
Hope this helps.
Thanks, accepted. The only issue being, since I am doing every thing using SDK, it takes a lot of API calls to get things done. I mean to solve this, first I am generating a Token and then calling this API. A simple add default "Prediction Resource" for all apps on LUIS portal would have helped a lot. Anyways, thanks for this answer. – user3868541 Feb 3 at 9:45
Agreed that an Add default Prediction Resource would have made everything much better. I'm still not sure how to do this programmatically. I'm trying to do it in my service using the SDK

LUIS deployed through SharePoint - How to get user data?

We have deployed LUIS V4 in our Azure Platform, and made it available to our employee through SharePoint. It is currently open and does not need log in to be used.
We would like to capture information about who the person interacting with the bot is; is there any way that information related to the user can be retrieved? (employees to use the bot must be authenticated to Azure as it is within a SharePoint, but the bot doesn't require authentication as mentioned)
Thank you!
If you are just using LUIS, then no, it does not do any user specific tasks. It only translates an utterance (phrase) into specific actions (intents and entities), also does not store any state.
So all authorisations and user customisations need to be done outside of LUIS, with plain code. If you are using Azure/Microsoft Bot, you can hook up a channel to LUIS and use the id to identify user (skype id, phone number, microsoft teams id...)
A bit of info for connecting Azure Bot with SharePoint.

Can I assign same LUIS subscription key to multiple Luis apps?

Can I assign same LUIS subscription key (generated from azure portal) to more than one LUIS application (On Luis.ai portal). I tried doing that and getting following error when I use the luis application in my bot:
"This application cannot be accessed with the current subscription"
Technically the luis.ai portal allowed me to assign the same key to multiple Luis apps.
Yes, assuming they are in the same region.
The authoring key in LUIS.ai is not the same thing as the endpoint LUIS subscription key in portal.azure.com. The authoring key allows you to author any LUIS app and the endpoint key allows you to query any LUIS endpoint. This doc should help understand keys learn.microsoft.com/en-us/azure/cognitive-services/luis/

Resources