[SalesForce] REST OAuth connection for Bulk API queries

Is it possible to authenticate an OAuth app for the user and then make Bulk API queries on their behalf? The results are easily going to be more than 20k records each authenticated user.

When I have authenticated the session I obviously get back the token, refresh token and some other useful data. The Bulk API needs session ID which after looking at the access token it looks like it could be the part of the token before ! but if anyone could clear this up it would be amazing.

Thank you in advance

Best Answer

The Session ID that you get from any login source (SOAP or REST API) is generally compatible with any API that accepts such a Session ID (SOAP, REST, Metadata, Bulk, Streaming, etc). However, that token may have additional restrictions, such as by connected app settings, user profile permissions, etc. Assuming that the token has a particular permission, and the user has permission, and the app has permission, then that token is valid for that API. A fully-blessed token from a system administrator, for example, can access every single API, including Bulk, Tooling, Metadata, SOAP, REST, Streaming, etc, while a limited token from a regular user might only have access to REST and SOAP.

Related Topic