1

I'm trying to implement the OAuth 2.0 JWT Bearer flow for CDP Ingestion API Connected App. Below are the steps and here's the help doc reference - https://help.salesforce.com/s/articleView?language=en_US&id=sf.remoteaccess_oauth_jwt_flow.htm&type=5

  1. Created a x509 cert and uploaded it on the app

  2. To generate a valid JWT Token, using jwt.io, passing the correct values as header, claims set and public key + private RSA Key of the x509 cert. The Signature is Verified. JWT Code

  3. Next, I am using this token in the assertion header along with grant_type to generate an access_token, as mentioned in the 'Request Access Token' section of the Help Doc.

  4. This returns an access_token on Postman Response 200

  5. However, when I try to use this access_token to create a Bulk API Job in CDP (Ref: https://developer.salesforce.com/docs/atlas.en-us.234.0.c360a_api.meta/c360a_api/c360a_api_create_a_job.htm), it gives a 401 error saying JWT token is invalid. enter image description here

Am I generating the token incorrectly? Or is the usage incorrect? Support was of no help in this case.

0

1 Answer 1

1

Figured it out. Looks like we need to exchange the access_token for a Salesforce CDP Token. The CDP token in the response works!

https://developer.salesforce.com/docs/atlas.en-us.232.0.c360a_api.meta/c360a_api/c360a_acquire_an_access_token.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .