samuelclay / NewsBlur

NewsBlur is a personal news reader that brings people together to talk about the world. A new sound of an old instrument.
http://www.newsblur.com
MIT License
6.92k stars 1k forks source link

Android: newsletter dialog #1756

Closed samuelclay closed 1 year ago

samuelclay commented 2 years ago

Basically copy the dialog from the web. We really just need the email address easily copied, so make that front and center and single tap to copy directly to the clipboard.

https://forum.newsblur.com/t/android-app-access-email-newsletter-forward-address/9713/2

sictiru commented 1 year ago

@samuelclay Could you point me in the right direction to retrieve/generate the token necessary for email forwarding? The one that comes after the user name.

samuelclay commented 1 year ago

Use the secret_token from the /reader/feeds endpoint. Here's how reader_newsletters.js puts it together:

        var email = NEWSBLUR.Globals.username + "-" + NEWSBLUR.Globals.secret_token + "@newsletters.newsblur.com";
sictiru commented 1 year ago

@samuelclay /reader/feeds doesn't return secret_token in its response payload. Is there a filter in place for mobile/Android or something of sorts?

samuelclay commented 1 year ago

Looks like it's under share_ext_token in https://github.com/samuelclay/NewsBlur/blob/master/apps/reader/views.py#L489

samuelclay commented 1 year ago

I'm adding share_ext_token but it should also be in user.profile.secret_token.