Skip to content

Commit 5a4bb9a

Browse files
committed
Updated the examples
1 parent 4e79a9e commit 5a4bb9a

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

EXAMPLES.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
- [Enroll a Recovery Code](#enroll-a-recovery-code)
4444
- [Verify an Enrollment](#verify-an-enrollment)
4545
- [Delete an Authentication Method](#delete-an-authentication-method)
46+
- [Update an Authentication Method](#update-an-authentication-method)
4647
- [Credentials Manager](#credentials-manager)
4748
- [Secure Credentials Manager](#secure-credentials-manager)
4849
- [Usage](#usage)
@@ -2239,6 +2240,42 @@ myAccountClient.deleteAuthenticationMethod("phone|dev_...")
22392240
</details>
22402241

22412242

2243+
2244+
### Update an Authentication Method
2245+
**Scopes required:** `update:me:authentication_methods`
2246+
2247+
Updates a single authentication method.
2248+
2249+
**Prerequisites:**
2250+
2251+
The user must have the specific authentication method (identified by its ID) already enrolled.
2252+
2253+
```kotlin
2254+
myAccountClient.updateAuthenticationMethodById("{Authentication_Id}", "{Name}")
2255+
.start(object : Callback<Unit, MyAccountException> {
2256+
override fun onSuccess(result: Unit) {
2257+
// Deletion successful
2258+
}
2259+
override fun onFailure(error: MyAccountException) { }
2260+
})
2261+
```
2262+
<details>
2263+
<summary>Using Java</summary>
2264+
2265+
```java
2266+
myAccountClient.updateAuthenticationMethodById("{Authentication_Id}", "{Name}")
2267+
.start(new Callback<Void, MyAccountException>() {
2268+
@Override
2269+
public void onSuccess(Void result) {
2270+
// Deletion successful
2271+
}
2272+
@Override
2273+
public void onFailure(@NonNull MyAccountException error) { }
2274+
});
2275+
```
2276+
</details>
2277+
2278+
22422279
## Credentials Manager
22432280

22442281
### Secure Credentials Manager

0 commit comments

Comments
 (0)