SIM Swap Reference
The SIM Swap client operates with a specific user identifier (e.g., a phone number). To interact with the SIM Swap service for a particular user, you need to create a SimSwapUserClient configured for that user.
SimSwapUserClient
s are creating using the SimSwapClient
accessible from the GlideClient
.
SimSwapClient Reference
Methods
1. For
Description:
For
creates and returns a SimSwapUserClient
configured for the specified user identifier.
Syntax:
For(identifier types.UserIdentifier) (*SimSwapUserClient, error)
Parameters:
Parameter | Type | Description |
---|---|---|
identifier | UserIdentifier | An interface representing a user (can be a phonenumber, ip address or custom user id but only one of the above) |
UserIdentifier Properties:
Property | Type | Description |
---|---|---|
PhoneNumber | string | The phone number of the user. |
IPAddress | string | The IP address of the user. |
UserID | string | A custom user identifier. |
Only one of the properties should be provided.
Returns:
*SimSwapUserClient
: A pointer to a SimSwapUserClient configured for the specified user identifier.
Example:
client, err := glide.NewGlideClient(settings)
userClient, err := client.SimSwap.For(types.PhoneIdentifier{PhoneNumber: "+555123456789"})
SimSwapUserClient Reference
The SimSwapUserClient
is used to interact with the SIM Swap service for a specific phone number.