Description
I am trying to post data compliance after receiving the deauthorization event payload. I am following the instructions from these documents:
POST /auth/data/compliance
Data Compliance
Error
The request returns this:
{"reason":"Invalid Request","error":"invalid_request"}
Which App Type (OAuth / Chatbot / JWT / Webhook)?
OAuth
Which Endpoint/s?
Data Compliance API
How To Reproduce (If applicable)
I send POST to the URL that was in the document
client_id = ENV['ZOOM_APP_KEY']
client_secret = ENV['ZOOM_APP_SECRET']
headers_secret = Base64.strict_encode64("#{client_id}:#{client_secret}")
deauthorization_event = ZoomDeauthorizationEvent.find(deauthorization_event_id)
data_compliance_link = "https://api.zoom.us/oauth/data/compliance"
response = HTTParty.post(
data_compliance_link,
body: {
"client_id": deauthorization_event.client_id,
"user_id": deauthorization_event.user_id,
"account_id": deauthorization_event.account_id,
"deauthorization_event_received": {
"user_data_retention": deauthorization_event.user_data_retention,
"account_id": deauthorization_event.account_id,
"user_id": deauthorization_event.user_id,
"signature": deauthorization_event.signature,
"deauthorization_time": deauthorization_event.deauthorization_time,
"client_id": deauthorization_event.client_id
},
"compliance_completed": true
}.to_json,
headers: {
"Authorization": "Basic #{headers_secret}",
"Content-Type": "application/json",
"cache-control": "no-cache"
}
)
I am getting 400 response.code
Additional context
I am testing through ngrok, with production credentials provided by ZOOM.
I read all the posts from here, and it often seems like header problems (misspelling, etc)