https://github.com/nickysemenza/mixmax-lastfm-link-resolver
https://github.com/nickysemenza/mixmax-lastfm-link-resolver
email lastfm mixmax
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nickysemenza/mixmax-lastfm-link-resolver
- Owner: nickysemenza
- Created: 2017-03-08T21:21:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T21:33:58.000Z (about 8 years ago)
- Last Synced: 2025-02-09T00:18:40.304Z (4 months ago)
- Topics: email, lastfm, mixmax
- Language: JavaScript
- Size: 20.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Last.fm Mixmax link resolver
This will expand last.fm urls to a short preview.

## Running locally
1. Install using `npm install`
2. Add your [lastfm API key](http://www.last.fm/api/) to `utils/key.js`
3. Run using `npm start`
To simulate locally how Mixmax calls the resolver URL (to return HTML that goes into the email), run:```
curl https://localhost:9146/resolver?url=http%3A%2F%2Flast.fm%2Fuser%2F14nicholasse --insecure
```## Why do we run it in https locally?
Mixmax slash command APIs are required to be served over https. This is because they are queried directly from the Mixmax client in the browser (using AJAX) that's running on an HTTPS domain. Browsers forbid AJAX requests from https domains to call http APIs, for security. So we must run an https server with a locally-signed certificate.
See [here](http://developer.mixmax.com/docs/integration-api-appendix#local-development-error-neterr_insecure_response) for how to fix the **ERR_INSECURE_RESPONSE** error that you might get in Chrome.
## Installing to Mixmax
Add the resolver to the dashboard: https://app.mixmax.com/dashboard/settings/integrations
Use `last.fm/user/[^\/]+$` for the regex and `https://localhost:9146/resolver` for resolver url