Paul
Paul

Reputation: 3

Is it possible to obtain a token for the Consumer API using only my configured client_id and client_secret?

For my use case, I need to enable electronic statements for a customer.

On the docs page, I found the following endpoint, which seems to allow what we're doing: PUT /users/{userId}/documents/settings/per-account

However, I couldn't find a way to call this API without the customer logging in using OIDC/OAuth. The documentation only includes a guide on how to set up OIDC/OAuth authentication.

As we need to do this in a batch job, we would need access to this API without customer interaction.

Is it possible to obtain a token for the Consumer API using only my configured client_id and client_secret? Or do I need to use a different API?

I was already able to call the Enterprise API, but it doesn't provide the needed functionality.

I'm quite new to the whole ecosystem, so please understand if I missed some things.

Upvotes: 0

Views: 69

Answers (1)

Jaime Lopez Jr.
Jaime Lopez Jr.

Reputation: 671

The Consumer API does not that type of OAuth flow, and only supports the OAuth Authorization Code flow.

In contrast, the Admin API offers the OAuth Client Credentials flow, which uses a signed JWT, instead of a Client ID + Client Secret, to obtain an Access Token.

Upvotes: 0

Related Questions