Created
February 2, 2022 05:08
-
-
Save saiumesh535/c653a4ffaa0ec76852042fc1bf55ea70 to your computer and use it in GitHub Desktop.
Get Users in your GitHub Organisation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
async function getMembers() { | |
try { | |
const resp = await axios.default.get('https://api.github.com/orgs/<org_name>/members', { | |
headers: { | |
'Accept': "application/vnd.github.v3+json", | |
"Authorization": "Bearer <token>" | |
} | |
}); | |
console.log(resp) | |
} catch (error) { | |
console.error(error.message); | |
} | |
} | |
getMembers(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment