Description
I am having trouble using a the api key & secret from zoom gov from one of our clients. They obviously can not and should not share their zoom gov credentials.
So i am just trying to access this specific endpoint
GET https://api.zoom.us/v2/accounts/me/settings
But using our companies non-zoomgov api key&secret our code works.
The process is simple:
- creat jwt token
const getToken = (key, secret) => {
const payload = {
iss: key,
exp: new Date().getTime() + 50000
};
return jwt.sign(payload, secret);
}; - use the jwt token in
headers: { Authorization:Bearer ${token}
} - send the get request
exact code of the request:
const response = await axios({
method: ‘get’,
url: ‘https://api.zoom.us/v2/accounts/me/settings’,
headers: { Authorization: Bearer ${token}
}
});
Error
Request failed with status code 401
Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT
I have reviewed the API key and secret of our customers api key&secret to be correct they sent us a screenshot.