How to access "servlet/rtaImage" resources over the API

You might be able to use the OAuth accessToken in a cookie with the HTTP GET request to servlet/rtaImage depending on the scope you requested when getting it.

I believe you will need to use the full or web scopes to then make web requests or use frontdoor.jsp.

See:

  • Scope Parameter Values
  • Use OAuth 2.0 Tokens to login to Salesforce.com

The cookie will have the name sid and the domain ".salesforce.com".

You basically want to use the OAuth accessToken in place of the Session Id.

Note that the accessToken takes the same form as a session Id, but can't always be used to authenticate with the website. Your mileage may vary.