Http Sink Connector - OAuth2 not working

I am getting below error with my http sink connector.

Error while processing HTTP request with Url :, Status code : 401, Reason Phrase : Unauthorized, Response Content : {“Errors”:[“Authorization has been denied for this request.”],“Result”:{“Status”:“Failure”,“Message”:“Failed!”,“Data”:null}}, (io.confluent.connect.http.writer.HttpWriterImpl:401)

“request.method”:“POST”,
“http.api.url”: ,
“headers”:“Content-Type:application/json”,
“key.converter”:“org.apache.kafka.connect.storage.StringConverter”,
“value.converter”:“org.apache.kafka.connect.json.JsonConverter”,
“header.converter”: “org.apache.kafka.connect.storage.StringConverter”,
“behavior.on.error”: “log”,
“value.converter.schemas.enable”:false,

“auth.type”:“OAUTH2”,
“oauth2.token.url”:,
“oauth2.client.id”:,
“oauth2.client.secret”:,
“oauth2.client.auth.mode”:“url”,
“oauth2.token.property”:“access_token”,

Its working fine in postman tool and failing in http sink connector. It looks like the token generation is not working and because of this the POST API is failing.

For my token generation API , I need to pass header prefix as ‘bearer’, however I am not able to see the property for the same in http sink connector.

I am not getting the details of token generation API in kconnect log. So that I am not able to identify what’s the issue going on in my connector.

does anyone faced similar kind of issue or anyone have any idea what’s issue on this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.