creating URL for member profile using API - mailchimp

The MailChimp GUI uses the following URL format for displaying a member's profile (you must be logged in as the list admin):
https://us2.admin.mailchimp.com/lists/members/view?id=nnnnnnnnn
I'd like to construct the URL programmatically.
I can retrieve the member's data using the API (GET /lists/{list_id}/members/{subscriber_hash}
), but none of the returned parameters seems to related to the id required for the URL (nnnnnnnnn). The candidates would be "id" and "unique_email_id", but neither one has the right value.
I see that the subscriber list API has a parameter called "web_id". Perhaps the equivalent parameter is just missing from the member response, and there's no way around it?
The closest I'm able to get to this goal is to display the web page intended for the subscriber to update their preferences. (e.g., https://xxx.us2.list-manage.com/profile?u=xxx&id=xxx&e=xxx). In this URL, the member's ID is the one returned by the API.

The API now has the web_id parameter in the response. I tried it and it works!

Related

Microsoft Graph Security alert get internet message id

What I need:
Get access to the Internet Message Id for an email related incident via the Microsoft Graph Security API
My problem:
I used Outlook's reporting module and marked an email that was in my inbox as Phishing. This then created an event in https://security.microsoft.com. See the below image. Incident ID 16.
I put together a webhook that is able to pull alerts via the Microsoft Graph Security API. From this call I managed to retrieve the alert's ID. I then used that ID to get more information about the alert by using this call: (https://graph.microsoft.com/v1.0/security/alerts/{alert_id})
In the JSON body of the response there's a property called messageSecurityStates that is always empty. I found this link to Javadoc.io where the object's properties are described and it looks like this property should contain the Internet Message Id. But when querying the Microsoft Graph Security API, the object is always empty.
Question:
What do I need to do to ensure that my email related alerts that are queried via the MS Graph Security API have email related information such as Internet Message Id?

Is it possible to update a group's auto-reply settings using the API?

I'm using Gmail.Users.Settings.updateVacation to update our customer service rep's vacation responses automatically over the weekend and after-hours, so our customers who e-mail when we're not in the office get an informative message of when they can expect a response.
I am attempting to do the same thing with our Google Groups, but have not been able to find the correct API call. If I use the same method as above, but with a group's e-mail address, I get a "Delegation denied" error (even though I'm an Owner of the group). I suspect this is because a Group is not a User, and is just different.
I've found the Manage Group Settings API, which essentially has just one update method, and you use properties to specify what you want to update on the group. The problem is, there is no auto-reply property name that I can find.
How do I update a Group's auto-reply settings?
Many thanks!
Unfortunately, what you want cannot be achieved through the API.
All the possible methods are present in the Groups Settings API so if you didn't find the expected method there, then it means that is not possible through the API.
What you can do instead is to file a Feature Request here and provide all the necessary details.
Reference
Groups Settings API - Groups Resource.

Mailchimp - API equivalent to Lists Webhook

We can't setup a Webhook for security reasons so we would like to make a request to the Mailchimp API to get the same information that is contained in the Lists webhook (subscribes, unsubscribes, updates etc) and perform this daily.
I've been looking at the Mailchimp API docs and under the Lists section I can't see anything that would allow us to do a GET for all "list activities" similar to what is contained in the Lists webhook.
Does anyone know if it's possible to get the same information via the Mailchimp API that is contained in the Lists webhook?
I found this endpoint:
http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/#
which you can call using the Query String parameter:
since_last_changed - Restrict results to subscribers whose information changed after the set timeframe
So far this is the closest that I have found.

Passing state data with google actions

I am developing a Google Actions project for Google Home using api.ai.
Is it possible to pass a state parameter as part of the response to api.ai and have it included in the next request?
The Amazon Alexa API handles such a flow and it came in handy.
Thanks
EDIT:
I did not mention this before: I have api.ai sending requests to a webhook after google assistant triggers my intents. The response api.ai expects is defined here. I've tried including extra fields in the response but these are not included in any future intent requests from api.ai. I've also tried adding fields and values to the google specific portion of the response (defined here) to no avail.
As an example of what I am interested in, when responding to Alexa requests we can include a json field "sessionAttributes" which are then passed by Amazon in any future requests that are part of that interaction.
In this instance I query a database key on the first intent (which is subsequently used to pull a record) and pass that key in sessionAttributes to avoid performing that lookup for every intent request I receive.
The equivalent that you are looking for to sessionAttributes in Alexa dev depends on whether you are using an API.ai webhook or a conversation webhook. Reference this doc for more info on the differences.
Since you are using API.ai, assuming you are using the Node.js client library, use the snippet below. 'Contexts' can store data, not just serve as a flag of sorts to establish where you are in a conversation. Call setContext just before you call 'ask' and close out your webhook fulfillment.
app.setContext('<context name>', <lifespan of context>, <JSON to store>)
Then for the next round of fulfillment, retrieve the JSON from the parameters object within the Context. Get it with:
var myContext = app.getContext('<context name>')
Reference the examples in these docs for more info.
You could create an optional parameter in API.ai to catch/store this value and append any message being sent to API.ai with a marker and then the database value you want to cache, so API.ai recognizes from the marker the value to be cached as the parameter, and this would be passed back out of API.ai as well, so if you needed to chain/loop this, on your side you again just check if it has the special 'append' parameter value to append that to the next user message.
That being said, contexts can likely achieve the same end-goal you are trying to achieve in a much more straightforward fashion

Specifying the Group a New Message Should Go to for the Yammer Share Button

I am using the Yammer share button (not the api).
I noticed all it does is open a new popup with the url structure as:
https://www.yammer.com/messages/new with these parameters:
login: Whether to log the user in or not
status: Message to include in the post
trk_event: yammer_share (some tracking event)
However this always defaults to post to "All Company" group, is there a way to post to a specified group?
Maybe pass in the Group Id as a parameter or some other identifier like name?
Thanks,
Greg

Resources