amazon connect sdk, search user by email - node.js

I am trying to obtain the amazon connect ID, if existing, that is related to an email using the aws sdk for node.js
Reading the following sdk:
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Connect.html
or this one:
https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html
The closest thing I can see is describeUser, but that one requires the amazon connect id to retrieve the user data.
There are endpoints for search, but they dont seem to search users. It seems the only way is to get the entire user list via listUsers
Am I correct or is there a way to obtain a single user, given their email?

AWS doesnt offer this functionality, best that can do is get the full list of users then query the user data for each id to obtain the emails and finally filter them yourself.

Related

How can multiple different users use the same rest api on a platform to pull their unique data?

I want to build a project where a user will be able to press on a button to authorize my platform to access their data (e.g shopify data). When my platform has access (to their shopify platform) it will send that data to my database.
My questions is:
In order for my rest api to access the data (from e.g shopify platform) i have to give the rest api the api key of the user which is simple if it a single account, but when i have multiple users using the same rest api how should i handle it? How can i give the rest api the access code so it can pull the data (from e.g their shopify platform) for each user? What is the name of the technology that needs to be considered here?
I am a built lost on the terminology of my question which has given me a bit of a headache when trying to google it.
First off, you create an App that Shopify approves, and then your merchant customers would install this App in their store. That approval process by both Shopify and the merchant means you are given permission to access their Shopify data.
Next, you create some value by allowing the merchant to see their data in ways unique to what it is you are doing. So far, your database contains nothing but the name of the store and the access token with permission to access the Shopify API.
How you then proceed in your own App is up to you. Not much else to it really, if you already know what your value add is. Code that part up and you're done!

Chatbase API to get analytics data?

We are using Chatbase for multiple clients that we identify with a different version number.
See my previous question here: Track multiple context for the same Bot
We have a dashboard for all those clients and would like to show them their own data. A bit like Google analytics allows it.
So:
Is an API in the pipeline (I couldn't find any existing resources)
If not, in what alternative way could we get the data to present it?
We have a .csv export that is currently limited to the first 500 rows of your message variations report. It is on our roadmap to increase the scope of this report, however there is no official timeline for release.
Our recommendation for deploying an integration like you described in your message is as follows:
Have the user create a Chatbase account in order to obtain the API key
Have the user integrate their analytics on your platform by providing the API key
Send the messages from their bot to their Chatbase API
Provide the user deeplinks to the Chatbase reports from within your UI
Alternatively, you could configure your bot to send a redundant message to an internal database, or bigquery table to have access to all of your logs.
If you would like access to data you have sent to Chatbase up to this point, please contact chatbase-support#google.com and provide your bot's name and/or api key and we can provide a one-time export.

Managed Chromebook - How identify customers ? Asset-ID ? Policy?

I have a private extension in the chrome web store. This extension is for users and devices who are managed via the Google Admin / GSuit system.
When in use, the extension contacts the GSuit / big data servers to log data. To tell my customers appart, I get them to type in a unique customer ID into each of their chromebooks, one ID per customer.
This was ok, but I would like to automate the system. Can I send down the customer ID instead of getting them to type it in ?
I thought of using the Asset-ID to identify the chromebook - but I cant find any way to extract the asset-id in my extension to allow the device to send it back to the server !
I thought of using one of the free text policy settings - but I can't get access to those in the app either !
I don't want to use email address as some of my smaller customers use gmail, so they would all get clumped together.
As an account administrator, you can first try retrieving a user using a userKey which can be the user's primary email address, the unique user id, or one of the user's alias email addresses. A successful Users:get request will return users resource including customerID.
Then, with the customerID, you may now get the assetID by retrieving all chrome devices for an account. Use GET request and include the authorization described in Authorize requests.
Here's the sample request:
GET https://www.googleapis.com/admin/directory/v1/customer/my_customer or customerId/
devices/chromeos?projection=basic or full&query=query
&orderBy=orderBy category&sortOrder=ascending or descending order
&pageToken=token for next results page
&maxResults=max number of results per page
Response for this request will include annotatedAssetId.
Also, View Chrome device information might also help.

Easy way to retrieve userId of a User that is not active yet?

I provision a user through the docusign api and the new user is not active yet (status=ActivationSent). Now for whatever reason I want to deprovision this user. The deprovision API requires a userId. My question is finding this userId efficiently.
I tried getting the user information using the endpoint
/accounts/{accountId}/users?email={emailAddress} but it returned a 400 with error code USER_LACKS_MEMBERSHIP.
I saw I can get a list of all users for an account using the end point /accounts/{accountId}/users and then finding the user and userId I'm interested in. Is there a more efficient way to get the userId in this scenario than querying all users?
Also is there a corresponding SOAP call to get all of the users for an account? I can't find it in the SOAP documentation.
To the best of my knowledge, the method that you describe (retrieving a list of all users and then iterating through the list to find the user you want to deprovision) is the only way to find/retrieve the User Id of a user that has userStatus = "Activation Sent". Unfortunately (as you've discovered), the /accounts/{accountId}/users?email={emailAddress} is only successful for 'active' users.
That being said though -- when you provision a User via the REST API (POST /accounts/{accountId}/users), a successful Response should contain the userId for the new user. Perhaps your application can store the userId that's received in the response each time a new user is provisioned, and then you can subsequently use that userId value to deprovision a user if/when necessary.
I'm not very familiar with the SOAP API, but I don't see a "get all Users" operation in the DocuSign SOAP API Guide. I'd expect that type of operation to be part of the "Account Management Service API", but I'm not seeing it there.

How can I retrieve the check-in object from foursquare by querying with a checkin id?

I have obtained the 4sq checkin id from twitter streaming api and I want to get the details of the checkin such as userid, time, venueid etc.
However, when I check the 4sq api, I find that the related endpoint requires an acting user. So can anybody suggest what could be an alternative way to get this information? (especially user_id)
Thanks!!
Right now there is no alternative way:
The Checkin endpoint requires authentication, it will return the data you are looking for.
Foursquare requires you to act as a user (via OAuth) to get user related information.
The only thing that does not require authentication is the Venues Platform, but you cannot get information about checkins from it, just number of people who checked in a place.

Resources