Get specific logs from SendWithUs with API - sendwithus

I was just trying to get a specific logs from SendWithUs, but cannot really find any info. Googled all around the place. API documentation on SWU does not say how to pull like "email_name" with a specific text in it. I want to pull the logs where "email_name" could be specified or at least "email_name" like '%specificemailname%'. Any ideas?
I will really appreciate every single answer.

There isn't a way to filter logs programatically. Sendwithus has two log API endpoints. One to get information about a log using the receipt_id returned an a send API call. The second lists email event information (opens, clicks, etc) for a given log.
Did you reach out to the support team for help?

Related

Add Last Login to Users api call

Our customer wants to see a report of all their current users' last login dates, but I couldn't find a way to get that information from the current API:
http://docs.valence.desire2learn.com/res/user.html
It's a little frustrating, because it's so easy to get this data in the UI itself:
Is there any way we can get that data through the API? Thanks!
Currently, there is no way to get this information via an API call; however, you are not the first person to inquire about this, and I suspect it's on D2L's list of improvement items for their developer platform.

cant_delete_file even if I have the right scopes?

Since Slack doesn't support bulk delete, I have searched for alternatives. The search didn't took long, and I stumbled upon this Python script which use Slack's Web API to delete all files that are there for more than 30 days.
After struggling to get the token right, I got a valid token with the scopes files:read and files:write:user.
The script starts, gets the list of files, and sends the request to delete correctly, but the answer from Slack is systematic:
{"ok":false,"error":"cant_delete_file"}
Searching for this error code reveals it is because I don't have the permissions to do erase them.
I can't find any more information, and I'm struggling to know what goes wrong. What is the reason I don't have the permissions?
You need to be authenticated as an admin user to delete a file that belongs to another user.
I would agree that the error message could give more details about the situation.
Edit: this answer is outdated, see this comment.

Google web app to log page accesses to Google docs, slides, sheets, etc

I have a range of Google docs that are publicly viewable, but I would like to get some information about how often they are being viewed. I understand that there used to be a way of doing this with Google Analytics, but now that has been removed.
It seems to me that I have two main options, one of which is to make all my doc links point to a page which redirects according to a query string parameter, e.g.:
http://myurl.net?page=1 # Sends you to one page and logs the visit
http://myurl.net?page=2 # Sends you to another page and logs the visit
Or alternatively, I could try to embed some code in each doc that makes a call back to the server with its page number. But I don't know if this is possible.
The first option looks like it should be fairly easy, but I don't see how to redirect the client.
Could anyone give me some ideas about how to do this? It seems it would be useful for quite a lot of people.
Many thanks.
Justin.

Utterly confused about OAuth and Google Calendar Gadget

I'm working on a Google Calendar Gadget and need to load data for the user from a remote server. It's simple stuff, like favorite color, but I need the user's ID. Using makeRequest works in general, but I need to send the account name, or a hash of it, or any sort of identifier to my server so it gets the right data. What's the easiest way to get that info? Currently it asks the user via HTML form, every single time it loads, which is pretty lame.
I've been looking at OAuth stuff, trying examples, and nothing works... I got an OAuth client key but don't know how/where to use it (or if I do use it with a Gadget). I found the Calendar feed/scope URI but I'm not really sure if that's correct to just get a user identifier, maybe I should use accounts. Half the examples are for OAuth 1.0...it's really frustrating.
Does anyone know a way to do this, or a good example/tutorial that explains how, for a Gadget? I think Gadgets are different since they run on Google's servers...but don't really know how this makes them different in this context.
See the answer to this: osapi.people.get() returns 404 in google calendar sidebar gadget. Then associate the google user ID with your internal ID, if different.

How to get a list of all retweeters in Twitter?

I have seen numerous companies doing like Twitter lotteries where users got to retweet their tweet and then one of retweeters will get the prize or whatever.
I was wondering now how do they get the list of all retweeters or pick the winner?
I checked Twitter API and found only this thing: GET statuses/retweets/:id but it returns maximum of 100 retweeters. Is that the only way?
It looks likes there's a couple services out there doing almost exactly this. A quick google pulls up http://onekontest.com/ and there's a few other Twitter contest services, but they all seem to be different levels of broken since they haven't kept up with changes to the API.
As far as the Twitter API itself is concerned, if you were expecting more than 100 responses, I think using GET statuses/mentions makes the most sense. That API call returns any mentions of a user, and you can pass the flag include_rts to include any retweets of your tweets. Then, if you wanted to list RTs of a specific tweet, you could check the in_reply_to_status_id field in the returned data to see if it matches the original tweet ID. This API call only returns the last 800 status, 200 at a time, so if you expect a bunch of data, you would need to poll the API repeatedly over time to get all the tweets. I imagine services like favstar are doing exactly this, just on a larger scale.
If you're actually looking for code to do something like this, I wrote a sinatra app called twitter-rss-digest which handles querying Twitter over time to track different sorts of queries. It's pretty rough, and doesn't quite handle this specifically, but it might point you in the right direction if you want to code something.
The Twitter API has an endpoint that returns up to 100 retweeter IDs for a given tweet.
Note that for historical reasons, that endpoint only returns up to 100 results and the documentation about the cursor is useless. Twitter refused to fix the situation.
2013 note
That said, the first thread on the Developers site that surfaced in a quick google has #episod, a Twitter employee saying:
You can't likely get to all of them. The data is spread out. Your best bet is to use the REST API to determine many of the users who performed the retweet, but the data will still be constrained.
It's easiest to track retweets as they happen rather than try to find them from the past. Use the Streaming API for that.
I like muffinista's method, but I think if you want a 100% complete list of retweets, simply enable the retweet email notifications and write a script that polls the email box for those matching the subject "retweeted one of your Tweets!" and put the data into a table. Do this right from the start.
The site https://twren.ch/ enlists all the retweeters for a given tweet (note that it only enlists retweeters who are direct followers of the source tweeter.) Nevertheless its probably the only public source available.

Resources