From ec68e4952d665f22a5e3e03f4332f76058613694 Mon Sep 17 00:00:00 2001 From: David Chaiken Date: Fri, 19 Jul 2024 18:02:59 -0700 Subject: [PATCH] client credentials support more endpoints --- nodejs/scripts/get_access_token.js | 11 ++++------- python/scripts/get_access_token.py | 12 +++++------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/nodejs/scripts/get_access_token.js b/nodejs/scripts/get_access_token.js index c9c92ef..2a326e1 100755 --- a/nodejs/scripts/get_access_token.js +++ b/nodejs/scripts/get_access_token.js @@ -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) { diff --git a/python/scripts/get_access_token.py b/python/scripts/get_access_token.py index e3b32db..eb3f9a1 100755 --- a/python/scripts/get_access_token.py +++ b/python/scripts/get_access_token.py @@ -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