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
Created a x509 cert and uploaded it on the app
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.
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.
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.
Am I generating the token incorrectly? Or is the usage incorrect? Support was of no help in this case.