From e25392072657dccf471fd64e670b6d71e889fcc0 Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Sat, 12 Oct 2024 00:29:28 -0600 Subject: [PATCH 1/7] Updated version for fusionauth-php-client to 1.55.0 --- build.savant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.savant b/build.savant index 4e92f9b..e068a10 100644 --- a/build.savant +++ b/build.savant @@ -14,7 +14,7 @@ * language governing permissions and limitations under the License. */ -project(group: "io.fusionauth", name: "fusionauth-php-client", version: "1.54.0", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "fusionauth-php-client", version: "1.55.0", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() From cc2b384daff601c6e5b47a546a40cab2502ed97c Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Fri, 22 Nov 2024 15:57:01 -0700 Subject: [PATCH 2/7] Updated version for fusionauth-php-client to 1.56.0 --- build.savant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.savant b/build.savant index e068a10..0d268d3 100644 --- a/build.savant +++ b/build.savant @@ -14,7 +14,7 @@ * language governing permissions and limitations under the License. */ -project(group: "io.fusionauth", name: "fusionauth-php-client", version: "1.55.0", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "fusionauth-php-client", version: "1.56.0", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() From 64feafa92528e1b8412ccab71e4fb63d123f93dd Mon Sep 17 00:00:00 2001 From: Brady Wied Date: Thu, 23 Jan 2025 15:32:58 -0700 Subject: [PATCH 3/7] client builder regen (#44) --- src/FusionAuth/FusionAuthClient.php | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/FusionAuth/FusionAuthClient.php b/src/FusionAuth/FusionAuthClient.php index ec0bf2c..aff67ee 100644 --- a/src/FusionAuth/FusionAuthClient.php +++ b/src/FusionAuth/FusionAuthClient.php @@ -304,6 +304,22 @@ public function commentOnUser($request) ->go(); } + /** + * Completes verification of an identity using verification codes from the Verify Start API. + * + * @param array $request The identity verify complete request that contains all the information used to verify the identity. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function completeVerifyIdentity($request) + { + return $this->start()->uri("/api/identity/verify/complete") + ->bodyHandler(new JSONBodyHandler($request)) + ->post() + ->go(); + } + /** * Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in * @@ -5319,6 +5335,22 @@ public function sendTwoFactorCodeForLoginUsingMethod($twoFactorId, $request) ->go(); } + /** + * Send a verification code using the appropriate transport for the identity type being verified. + * + * @param array $request The identity verify send request that contains all the information used send the code. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function sendVerifyIdentity($request) + { + return $this->start()->uri("/api/identity/verify/send") + ->bodyHandler(new JSONBodyHandler($request)) + ->post() + ->go(); + } + /** * Begins a login request for a 3rd party login that requires user interaction such as HYPR. * @@ -5374,6 +5406,23 @@ public function startTwoFactorLogin($request) ->go(); } + /** + * Start a verification of an identity by generating a code. This code can be sent to the User using the Verify Send API + * Verification Code API or using a mechanism outside of FusionAuth. The verification is completed by using the Verify Complete API with this code. + * + * @param array $request The identity verify start request that contains all the information used to begin the request. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function startVerifyIdentity($request) + { + return $this->start()->uri("/api/identity/verify/start") + ->bodyHandler(new JSONBodyHandler($request)) + ->post() + ->go(); + } + /** * Start a WebAuthn authentication ceremony by generating a new challenge for the user * From d606993a6df3ec5ce17c3ca4594d5a827def0d00 Mon Sep 17 00:00:00 2001 From: Brady Wied Date: Wed, 7 May 2025 14:36:40 -0600 Subject: [PATCH 4/7] ENG-2608 - New APIs/method overloads (#51) * capture current cli state * add report method * let's run on all PRs * forgot PHP * test/issue 1 * revert overloads * test fixes * client correct/optional * now that this overload does not have opt params, remove defaults --- .github/workflows/test.yaml | 58 +++++++++++------------ src/FusionAuth/FusionAuthClient.php | 43 +++++++++++++++++ tests/FusionAuth/FusionAuthClientTest.php | 15 ++++++ 3 files changed, 86 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 668fb32..e9eed52 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,8 +5,6 @@ on: branches: - main pull_request: - branches: - - main workflow_dispatch: permissions: @@ -16,31 +14,31 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - name: Set up FusionAuth - working-directory: .github/fusionauth - run: docker compose up -d - - - name: Validate composer.json and composer.lock - run: | - composer update - composer validate - - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v4 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- - - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Waiting for FusionAuth App - run: timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9011)" != "200" ]]; do sleep 5; done' || false - - - name: Run test suite - run: composer run test + - uses: actions/checkout@v4 + + - name: Set up FusionAuth + working-directory: .github/fusionauth + run: docker compose up -d + + - name: Validate composer.json and composer.lock + run: | + composer update + composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v4 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Waiting for FusionAuth App + run: timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9011)" != "200" ]]; do sleep 5; done' || false + + - name: Run test suite + run: composer run test diff --git a/src/FusionAuth/FusionAuthClient.php b/src/FusionAuth/FusionAuthClient.php index 1e6c470..2beb35f 100644 --- a/src/FusionAuth/FusionAuthClient.php +++ b/src/FusionAuth/FusionAuthClient.php @@ -4392,6 +4392,24 @@ public function retrieveUserByLoginId($loginId) ->go(); } + /** + * Retrieves the user for the loginId, using specific loginIdTypes. + * + * @param string $loginId The email or username of the user. + * @param array $loginIdTypes the identity types that FusionAuth will compare the loginId to. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function retrieveUserByLoginIdWithLoginIdTypes($loginId, $loginIdTypes) + { + return $this->start()->uri("/api/user") + ->urlParameter("loginId", $loginId) + ->urlParameter("loginIdTypes", $loginIdTypes) + ->get() + ->go(); + } + /** * Retrieves the user for the given username. * @@ -4621,6 +4639,31 @@ public function retrieveUserLoginReportByLoginId($applicationId, $loginId, $star ->go(); } + /** + * Retrieves the login report between the two instants for a particular user by login Id, using specific loginIdTypes. If you specify an application id, it will only return the + * login counts for that application. + * + * @param string $applicationId (Optional) The application id. + * @param string $loginId The userId id. + * @param array $start The start instant as UTC milliseconds since Epoch. + * @param array $end The end instant as UTC milliseconds since Epoch. + * @param array $loginIdTypes the identity types that FusionAuth will compare the loginId to. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function retrieveUserLoginReportByLoginIdAndLoginIdTypes($applicationId, $loginId, $start, $end, $loginIdTypes) + { + return $this->start()->uri("/api/report/login") + ->urlParameter("applicationId", $applicationId) + ->urlParameter("loginId", $loginId) + ->urlParameter("start", $start) + ->urlParameter("end", $end) + ->urlParameter("loginIdTypes", $loginIdTypes) + ->get() + ->go(); + } + /** * Retrieves the last number of login records for a user. * diff --git a/tests/FusionAuth/FusionAuthClientTest.php b/tests/FusionAuth/FusionAuthClientTest.php index 27fc9b2..cba9231 100644 --- a/tests/FusionAuth/FusionAuthClientTest.php +++ b/tests/FusionAuth/FusionAuthClientTest.php @@ -118,6 +118,21 @@ public function testCanHandleUsers(): void $this->handleResponse($response); $this->assertEquals("test@fusionauth.io", $response->successResponse->user->email); + // retrieve by login Id (default types) + $response = $this->client->retrieveUserByLoginId("test@fusionauth.io"); + $this->handleResponse($response); + $this->assertEquals("test@fusionauth.io", $response->successResponse->user->email); + + // retrieve by login Id (explicit types) + $response = $this->client->retrieveUserByLoginIdWithLoginIdTypes("test@fusionauth.io", ["email"]); + $this->handleResponse($response); + $this->assertEquals("test@fusionauth.io", $response->successResponse->user->email); + + // retrieve by login Id (not found, wrong type) +// TODO: will pass once issue 1 is live +// $response = $this->client->retrieveUserByLoginIdWithLoginIdTypes("test@fusionauth.io", ["phoneNumber"]); +// $this->assertEquals(404, $response->status); + // Login $response = $this->client->login(["loginId" => "test@fusionauth.io", "password" => "password"]); $this->handleResponse($response); From b6afd91a2e976bc3158381046edada9b598cd9a8 Mon Sep 17 00:00:00 2001 From: Brady Wied Date: Thu, 12 Jun 2025 11:48:21 -0600 Subject: [PATCH 5/7] client builder sb build --- src/FusionAuth/FusionAuthClient.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/FusionAuth/FusionAuthClient.php b/src/FusionAuth/FusionAuthClient.php index 2beb35f..f5c9ad4 100644 --- a/src/FusionAuth/FusionAuthClient.php +++ b/src/FusionAuth/FusionAuthClient.php @@ -184,6 +184,27 @@ public function changePassword($changePasswordId, $request) ->go(); } + /** + * Changes a user's password using their access token (JWT) instead of the changePasswordId + * A common use case for this method will be if you want to allow the user to change their own password. + * + * Remember to send refreshToken in the request body if you want to get a new refresh token when login using the returned oneTimePassword. + * + * @param string $encodedJWT The encoded JWT (access token). + * @param array $request The change password request that contains all the information used to change the password. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function changePasswordByJWT($encodedJWT, $request) + { + return $this->startAnonymous()->uri("/api/user/change-password") + ->authorization("Bearer " . $encodedJWT) + ->bodyHandler(new JSONBodyHandler($request)) + ->post() + ->go(); + } + /** * Changes a user's password using their identity (loginId and password). Using a loginId instead of the changePasswordId * bypasses the email verification and allows a password to be changed directly without first calling the #forgotPassword From 7f1f69d3576f54558f40cf8f6c085d14d412ee9c Mon Sep 17 00:00:00 2001 From: Spencer Witt <3409780+spwitt@users.noreply.github.com> Date: Mon, 16 Jun 2025 09:08:37 -0500 Subject: [PATCH 6/7] add /api/user/verify and request to clients (#53) --- src/FusionAuth/FusionAuthClient.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/FusionAuth/FusionAuthClient.php b/src/FusionAuth/FusionAuthClient.php index f5c9ad4..cd51897 100644 --- a/src/FusionAuth/FusionAuthClient.php +++ b/src/FusionAuth/FusionAuthClient.php @@ -6344,6 +6344,22 @@ public function verifyEmailAddressByUserId($request) ->go(); } + /** + * Administratively verify a user identity. + * + * @param array $request The identity verify request that contains information to verify the identity. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function verifyIdentity($request) + { + return $this->start()->uri("/api/identity/verify") + ->bodyHandler(new JSONBodyHandler($request)) + ->post() + ->go(); + } + /** * Confirms an application registration. The Id given is usually from an email sent to the user. * From 7bd4c23238cc7b988c9c82d652d4f2a456583847 Mon Sep 17 00:00:00 2001 From: Brady Wied Date: Thu, 24 Jul 2025 11:45:28 -0600 Subject: [PATCH 7/7] sb build follow up --- src/FusionAuth/FusionAuthClient.php | 120 ++++++++++++++++------------ 1 file changed, 71 insertions(+), 49 deletions(-) diff --git a/src/FusionAuth/FusionAuthClient.php b/src/FusionAuth/FusionAuthClient.php index cd51897..657db36 100644 --- a/src/FusionAuth/FusionAuthClient.php +++ b/src/FusionAuth/FusionAuthClient.php @@ -2,7 +2,7 @@ namespace FusionAuth; /* - * Copyright (c) 2018-2023, FusionAuth, All Rights Reserved + * Copyright (c) 2018-2025, FusionAuth, All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -195,6 +195,7 @@ public function changePassword($changePasswordId, $request) * * @return ClientResponse The ClientResponse. * @throws \Exception + * @deprecated This method has been renamed to changePasswordUsingJWT, use that method instead. */ public function changePasswordByJWT($encodedJWT, $request) { @@ -223,6 +224,27 @@ public function changePasswordByIdentity($request) ->go(); } + /** + * Changes a user's password using their access token (JWT) instead of the changePasswordId + * A common use case for this method will be if you want to allow the user to change their own password. + * + * Remember to send refreshToken in the request body if you want to get a new refresh token when login using the returned oneTimePassword. + * + * @param string $encodedJWT The encoded JWT (access token). + * @param array $request The change password request that contains all the information used to change the password. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function changePasswordUsingJWT($encodedJWT, $request) + { + return $this->startAnonymous()->uri("/api/user/change-password") + ->authorization("Bearer " . $encodedJWT) + ->bodyHandler(new JSONBodyHandler($request)) + ->post() + ->go(); + } + /** * Check to see if the user must obtain a Trust Token Id in order to complete a change password request. * When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change @@ -989,7 +1011,7 @@ public function deactivateUserAction($userActionId) } /** - * Deactivates the users with the given ids. + * Deactivates the users with the given Ids. * * @param array $userIds The ids of the users to deactivate. * @@ -1008,7 +1030,7 @@ public function deactivateUsers($userIds) } /** - * Deactivates the users with the given ids. + * Deactivates the users with the given Ids. * * @param array $userIds The ids of the users to deactivate. * @@ -1582,8 +1604,8 @@ public function deleteUserWithRequest($userId, $request) } /** - * Deletes the users with the given ids, or users matching the provided JSON query or queryString. - * The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request. + * Deletes the users with the given Ids, or users matching the provided JSON query or queryString. + * The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request. * * This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. * Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users. @@ -1603,8 +1625,8 @@ public function deleteUsers($request) } /** - * Deletes the users with the given ids, or users matching the provided JSON query or queryString. - * The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request. + * Deletes the users with the given Ids, or users matching the provided JSON query or queryString. + * The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request. * * This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. * Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users. @@ -2253,7 +2275,7 @@ public function lookupIdentityProvider($domain) * Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the * action. * - * @param string $actionId The Id of the action to modify. This is technically the user action log id. + * @param string $actionId The Id of the action to modify. This is technically the user action log Id. * @param array $request The request that contains all the information about the modification. * * @return ClientResponse The ClientResponse. @@ -2285,10 +2307,10 @@ public function passwordlessLogin($request) } /** - * Updates an authentication API key by given id + * Updates an API key with the given Id. * - * @param string $keyId The Id of the authentication key. If not provided a secure random api key will be generated. - * @param array $request The request object that contains all the information needed to create the APIKey. + * @param string $keyId The Id of the API key. If not provided a secure random api key will be generated. + * @param array $request The request object that contains all the information needed to create the API key. * * @return ClientResponse The ClientResponse. * @throws \Exception @@ -2298,7 +2320,7 @@ public function patchAPIKey($keyId, $request) return $this->start()->uri("/api/api-key") ->urlSegment($keyId) ->bodyHandler(new JSONBodyHandler($request)) - ->post() + ->patch() ->go(); } @@ -2951,7 +2973,7 @@ public function reindex($request) } /** - * Removes a user from the family with the given id. + * Removes a user from the family with the given Id. * * @param string $familyId The Id of the family to remove the user from. * @param string $userId The Id of the user to remove from the family. @@ -3022,7 +3044,7 @@ public function resendRegistrationVerification($email, $applicationId) } /** - * Retrieves an authentication API key for the given id + * Retrieves an authentication API key for the given Id. * * @param string $keyId The Id of the API key to retrieve. * @@ -3108,7 +3130,7 @@ public function retrieveActiveActions($userId) /** * Retrieves the application for the given Id or all the applications if the Id is null. * - * @param string $applicationId (Optional) The application id. + * @param string $applicationId (Optional) The application Id. * * @return ClientResponse The ClientResponse. * @throws \Exception @@ -3212,10 +3234,10 @@ public function retrieveConsents() } /** - * Retrieves the daily active user report between the two instants. If you specify an application id, it will only + * Retrieves the daily active user report between the two instants. If you specify an application Id, it will only * return the daily active counts for that application. * - * @param string $applicationId (Optional) The application id. + * @param string $applicationId (Optional) The application Id. * @param array $start The start instant as UTC milliseconds since Epoch. * @param array $end The end instant as UTC milliseconds since Epoch. * @@ -3233,7 +3255,7 @@ public function retrieveDailyActiveReport($applicationId, $start, $end) } /** - * Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates. + * Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates. * * @param string $emailTemplateId (Optional) The Id of the email template. * @@ -3748,10 +3770,10 @@ public function retrieveLambdasByType($type) } /** - * Retrieves the login report between the two instants. If you specify an application id, it will only return the + * Retrieves the login report between the two instants. If you specify an application Id, it will only return the * login counts for that application. * - * @param string $applicationId (Optional) The application id. + * @param string $applicationId (Optional) The application Id. * @param array $start The start instant as UTC milliseconds since Epoch. * @param array $end The end instant as UTC milliseconds since Epoch. * @@ -3769,7 +3791,7 @@ public function retrieveLoginReport($applicationId, $start, $end) } /** - * Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates. + * Retrieves the message template for the given Id. If you don't specify the Id, this will return all the message templates. * * @param string $messageTemplateId (Optional) The Id of the message template. * @@ -3845,10 +3867,10 @@ public function retrieveMessengers() } /** - * Retrieves the monthly active user report between the two instants. If you specify an application id, it will only + * Retrieves the monthly active user report between the two instants. If you specify an application Id, it will only * return the monthly active counts for that application. * - * @param string $applicationId (Optional) The application id. + * @param string $applicationId (Optional) The application Id. * @param array $start The start instant as UTC milliseconds since Epoch. * @param array $end The end instant as UTC milliseconds since Epoch. * @@ -4063,7 +4085,7 @@ public function retrieveRefreshTokens($userId) } /** - * Retrieves the user registration for the user with the given Id and the given application id. + * Retrieves the user registration for the user with the given Id and the given application Id. * * @param string $userId The Id of the user. * @param string $applicationId The Id of the application. @@ -4081,10 +4103,10 @@ public function retrieveRegistration($userId, $applicationId) } /** - * Retrieves the registration report between the two instants. If you specify an application id, it will only return + * Retrieves the registration report between the two instants. If you specify an application Id, it will only return * the registration counts for that application. * - * @param string $applicationId (Optional) The application id. + * @param string $applicationId (Optional) The application Id. * @param array $start The start instant as UTC milliseconds since Epoch. * @param array $end The end instant as UTC milliseconds since Epoch. * @@ -4303,7 +4325,7 @@ public function retrieveUser($userId) } /** - * Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user + * Retrieves the user action for the given Id. If you pass in null for the Id, this will return all the user * actions. * * @param string $userActionId (Optional) The Id of the user action. @@ -4320,7 +4342,7 @@ public function retrieveUserAction($userActionId = NULL) } /** - * Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user + * Retrieves the user action reason for the given Id. If you pass in null for the Id, this will return all the user * action reasons. * * @param string $userActionReasonId (Optional) The Id of the user action reason. @@ -4469,8 +4491,8 @@ public function retrieveUserByVerificationId($verificationId) * * This API is useful if you want to build your own login workflow to complete a device grant. * - * @param string $client_id The client id. - * @param string $client_secret The client id. + * @param string $client_id The client Id. + * @param string $client_secret The client Id. * @param string $user_code The end-user verification code. * * @return ClientResponse The ClientResponse. @@ -4615,11 +4637,11 @@ public function retrieveUserLinksByUserId($identityProviderId, $userId) } /** - * Retrieves the login report between the two instants for a particular user by Id. If you specify an application id, it will only return the + * Retrieves the login report between the two instants for a particular user by Id. If you specify an application Id, it will only return the * login counts for that application. * - * @param string $applicationId (Optional) The application id. - * @param string $userId The userId id. + * @param string $applicationId (Optional) The application Id. + * @param string $userId The userId Id. * @param array $start The start instant as UTC milliseconds since Epoch. * @param array $end The end instant as UTC milliseconds since Epoch. * @@ -4638,11 +4660,11 @@ public function retrieveUserLoginReport($applicationId, $userId, $start, $end) } /** - * Retrieves the login report between the two instants for a particular user by login Id. If you specify an application id, it will only return the + * Retrieves the login report between the two instants for a particular user by login Id. If you specify an application Id, it will only return the * login counts for that application. * - * @param string $applicationId (Optional) The application id. - * @param string $loginId The userId id. + * @param string $applicationId (Optional) The application Id. + * @param string $loginId The userId Id. * @param array $start The start instant as UTC milliseconds since Epoch. * @param array $end The end instant as UTC milliseconds since Epoch. * @@ -4768,7 +4790,7 @@ public function retrieveWebAuthnCredentialsForUser($userId) } /** - * Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks. + * Retrieves the webhook for the given Id. If you pass in null for the Id, this will return all the webhooks. * * @param string $webhookId (Optional) The Id of the webhook. * @@ -5068,7 +5090,7 @@ public function searchEntities($request) } /** - * Retrieves the entities for the given ids. If any Id is invalid, it is ignored. + * Retrieves the entities for the given Ids. If any Id is invalid, it is ignored. * * @param array $ids The entity ids to search for. * @@ -5292,7 +5314,7 @@ public function searchUserComments($request) } /** - * Retrieves the users for the given ids. If any Id is invalid, it is ignored. + * Retrieves the users for the given Ids. If any Id is invalid, it is ignored. * * @param array $ids The user ids to search for. * @@ -5309,9 +5331,9 @@ public function searchUsers($ids) } /** - * Retrieves the users for the given ids. If any Id is invalid, it is ignored. + * Retrieves the users for the given Ids. If any Id is invalid, it is ignored. * - * @param array $ids The user ids to search for. + * @param array $ids The user Ids to search for. * * @return ClientResponse The ClientResponse. * @throws \Exception @@ -5392,7 +5414,7 @@ public function searchWebhooks($request) } /** - * Send an email using an email template id. You can optionally provide requestData to access key value + * Send an email using an email template Id. You can optionally provide requestData to access key value * pairs in the email template. * * @param string $emailTemplateId The Id for the template. @@ -5647,18 +5669,18 @@ public function twoFactorLogin($request) } /** - * Updates an API key by given id + * Updates an API key with the given Id. * - * @param string $apiKeyId The Id of the API key to update. - * @param array $request The request object that contains all the information used to create the API Key. + * @param string $keyId The Id of the API key to update. + * @param array $request The request that contains all the new API key information. * * @return ClientResponse The ClientResponse. * @throws \Exception */ - public function updateAPIKey($apiKeyId, $request) + public function updateAPIKey($keyId, $request) { return $this->start()->uri("/api/api-key") - ->urlSegment($apiKeyId) + ->urlSegment($keyId) ->bodyHandler(new JSONBodyHandler($request)) ->put() ->go(); @@ -6231,7 +6253,7 @@ public function upsertEntityGrant($entityId, $request) * If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant. * * @param string $user_code The end-user verification code. - * @param string $client_id The client id. + * @param string $client_id The client Id. * * @return ClientResponse The ClientResponse. * @throws \Exception @@ -6416,4 +6438,4 @@ private function startAnonymous() ->successResponseHandler(new JSONResponseHandler()) ->errorResponseHandler(new JSONResponseHandler()); } -} \ No newline at end of file +}