The SIM swap API provides a programmable interface for developers and other users (capabilities consumers) to request the last date of a SIM swap performed on the mobile line, or, to check whether a SIM swap has been performed during a past period.
The SIM Swap API performs real-time checks on the last SIM Swap event.
The SIM Swap API is useful to prevent fraud by reducing the risk of account takeover fraud by strengthening SIM based authentication processes such as SMS One-time passwords. Fraudsters are using SIM swap techniques to intercept SMS messages and reset passwords or receive verification codes that allow them to access protected accounts.
The SIM Swap API can also be used to protect non-automated actions. For example, when a call center expect contacts a user to clarify or confirm a sensitive operation.
This API is used by an application to get information about a mobile line latest SIM swap date. It can be easily integrated and used through this secured API and allows SPs (Service Provider) to get this information an easy & secured way. The API provides management of 2 endpoints answering 2 distinct questions:
Depending on the network provider implementation, legal enforcement, etc... either one or both endpoints could be implemented.
SIM swap: A SIM swap is a process in which a user's mobile phone number (MSISDN) is associated with a new SIM card (IMSI). This is typically done by contacting the user's mobile service provider and requesting a new SIM card for various reasons, such as a lost or damaged SIM card or upgrading to a new phone.
SimSwap also happens during other actions like changing user's phone number, changing mobile service provider keeping user's mobile phone number or when activating a new SIM associated to the same phone number, known as multisim service.
The API provides 2 operations:
POST retrieve-date : Provides timestamp of latest SIM swap, if any, for a given phone number. If no swap has been performed, the API will return the SIM activation date (the timestamp of the first time that the sim connected to the network) by default, unless this is not possible due to local regulations preventing the safekeeping of the information for longer than the stated period of time. If this is the case, a null
value will be returned.
POST check: Checks if SIM swap has been performed during a past period (defined in the request with 'maxAge' attribute) for a given phone number.
GSMA Mobile Connect Account Takeover Protection specification was used as source of input for this API. For more about Mobile Connect, please see Mobile Connect website.
(FAQs will be added in a later version of the documentation)
https://developers.opgw.u.com.my/_mock/sim-swap/sim_swap/
https://developers.opgw.u.com.my/{apiRootAuth}/
https://developers.opgw.u.com.my/{apiRootSIMSwap}/
The SP makes a request to Backchannel Authentication Endpoint to ask for end-user authorization. NIOP validates the MSISDN is a valid MSISDN and checks consent. If successful, it passes the request to the NIOP for processing. Once NIOP processing is successful, an “auth_req_id” is provided in the response to the SP.
“Basic “ + base_64_encode (client_id + “:” + client_secret)
The SP makes a request to Backchannel Authentication Endpoint to ask for end-user authorization. NIOP validates the MSISDN is a valid MSISDN and checks consent. If successful, it passes the request to the NIOP for processing. Once NIOP processing is successful, an “auth_req_id” is provided in the response to the SP.
End-user for whom the authentication is being requested. This is MSISDN in the format “tel:+{MSISDN}”, where +" prefix is optional. Examples: “tel:+447123456789” or “tel:34712345678”.
This parameter commonly used in OAuth 2.0 and OpenID Connect protocols to specify the type of client assertion being used for authentication in a client-server interaction.
The client_assertion is a security measure used in authentication processes, especially within OAuth 2.0 and OpenID Connect, to authenticate the client (such as a web application, mobile app, or service) to an authorization server.
https://developers.opgw.u.com.my/_mock/sim-swap/sim_swap/openIDConnectCIBA/v1/bc-authorize
https://developers.opgw.u.com.my/https://api-sandbox.opgw.u.com.my/ac/auth-service/openIDConnectCIBA/v1/bc-authorize
https://developers.opgw.u.com.my/https://api.opgw.u.com.my/sim-swap-service/sim-swap/v0/openIDConnectCIBA/v1/bc-authorize
curl -i -X POST \
https://developers.opgw.u.com.my/_mock/sim-swap/sim_swap/openIDConnectCIBA/v1/bc-authorize \
-H 'Authorization: Basic d3lCOHF1R0RPWTdXTnUyVUV2eGF5Sk9aNVpTSU1KM1Y6V2ZHQUJqSUJpRDIySg==
' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'x-correlator: string' \
-d 'login_hint=tel:+447123456789' \
-d scope=retrieve-sim-swap-date \
-d request=string \
-d client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \
-d client_assertion=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjbGllZW50LWlkI........
OK If the authorization request is successfully completed (i.e. without error), an authorization id (auth_req_id) is returned by ID Gateway, in an HTTP 200 response in json payload with parameters.
Unique Id of this authorization (to be used in the token request).
The timeout available to make a request to the token endpoint. i.e. The request must be made before the “expires_in” time is reached.
{ "auth_req_id": "39da5b19-457a-4d30-a5c4-047c62dcca3b", "expires_in": 300, "interval": 0 }
“Basic “ + base_64_encode (client_id + “:” + client_secret)
The request to the token endpoint must be sent using the HTTP POST method and have parameters populated in accordance with the rules.
The auth_req_id received in the successful authorization endpoint response.
For all token requests the value of the grant_type parameter MUST have the value: "urn:openid:params:mc:grant-type:ciba" (Note: must be url encoded)
This parameter commonly used in OAuth 2.0 and OpenID Connect protocols to specify the type of client assertion being used for authentication in a client-server interaction.
The client_assertion is a security measure used in authentication processes, especially within OAuth 2.0 and OpenID Connect, to authenticate the client (such as a web application, mobile app, or service) to an authorization server.
https://developers.opgw.u.com.my/_mock/sim-swap/sim_swap/openIDConnectCIBA/v1/token
https://developers.opgw.u.com.my/https://api-sandbox.opgw.u.com.my/ac/auth-service/openIDConnectCIBA/v1/token
https://developers.opgw.u.com.my/https://api.opgw.u.com.my/sim-swap-service/sim-swap/v0/openIDConnectCIBA/v1/token
curl -i -X POST \
https://developers.opgw.u.com.my/_mock/sim-swap/sim_swap/openIDConnectCIBA/v1/token \
-H 'Authorization: Basic d3lCOHF1R0RPWTdXTnUyVUV2eGF5Sk9aNVpTSU1KM1Y6V2ZHQUJqSUJpRDIySg==
' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'x-correlator: string' \
-d auth_req_id=39da5b19-457a-4d30-a5c4-047c62dcca3b \
-d grant_type=urn:openid:params:mc:grant-type:ciba \
-d client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \
-d client_assertion=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjbGllZW50LWlkI........
OK If the token request is successfully completed (i.e. without error), an acess_token is returned by Gateway, in an HTTP 200 response in json payload with parameters.
OAuth 2.0 access_token used to gain access to the end-user information. This token CANNOT can be reused
The timeout available to make a request to the token endpoint. i.e. The request must be made before the “expires_in” time is reached.
Expiration time of the Access Token in seconds since the response was generated.
{ "access_token": "dUk4Bs0qgKQKujbGxQDvIdXkI6Bz", "token_type": "Always \"Bearer\"", "expires_in":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