Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client credentials support more endpoints #125

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions nodejs/scripts/get_access_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,10 @@ async function main(argv) {
access_token.write();
}

// Remove this conditional when GET /v5/user_account works with client credentials
if (!args.client_credentials) {
// use the access token to get information about the user
const user = new User(api_config, access_token);
const user_data = await user.get();
user.print_summary(user_data);
}
// use the access token to get information about the user
const user = new User(api_config, access_token);
const user_data = await user.get();
user.print_summary(user_data);
}

if (!process.env.TEST_ENV) {
Expand Down
12 changes: 5 additions & 7 deletions python/scripts/get_access_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,11 @@ def main(argv=[]):
print("writing access token")
access_token.write()

# Remove this conditional when GET /v5/user_account works with client credentials
if not args.client_credentials:
# Use the access token to get information about the user. The purpose of this
# call is to verify that the access token is working.
user = User(api_config, access_token)
user_data = user.get()
user.print_summary(user_data)
# Use the access token to get information about the user. The purpose of this
# call is to verify that the access token is working.
user = User(api_config, access_token)
user_data = user.get()
user.print_summary(user_data)


# If this script is being called from the command line, call the main function
Expand Down
Loading