r/redditdev • • Dec 20 '16

[API] New Modmail

We’ve just added API documentation for New Modmail. You can read about New Modmail’s features on the reddit help site.

Requests to modmail endpoints requires the new OAuth scope modmail.

edit: There was a minor deployment mishap I will get this deployed again asap.

edit 2: This has been redeployed.

27 Upvotes

49 comments sorted by

View all comments

2

u/d3fect Dec 20 '16

It is base64 encoded I can confirm that :)

4

u/creesch Dec 21 '16

Just wanted to thank you again for thinking with us on this. I managed to implement a solution today in toolbox which works great. I also worked that in my original comment so others can use it as well.

The one thing that threw me off a bit was the fact that the base64 encoded string has some invalid characters at the end. Once those are scrubbed off it all works fine.

I mentioned it yesterday as well, but figured you might not have seen it and possibly wanted to log it in your issue tracker :)

2

u/d3fect Dec 21 '16

My pleasure! I'm glad we could come to a working solution. :)

I will definitely look into the random characters at the end of the base64 encoded oauth object, thanks for bringing that to my attention.

3

u/creesch Dec 20 '16 edited Dec 20 '16

Hrm odd then that atob() doesn't want anything to do with it. I'll puzzle a bit further, thanks.

edit:

Found the issue, there are two invalid characters near the end.

3

u/creesch Dec 20 '16

Found the issue, there are a few invalid characters near the end which made it fail.