SIM Swap APIs (1.0.0)

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.

Introduction

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:

  • When did the last SIM swap occur?
  • Has a SIM swap occurred during last n hours?

Depending on the network provider implementation, legal enforcement, etc... either one or both endpoints could be implemented.

Relevant terms and definitions

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.

API functionality

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.

Authorization and authentication

CAMARA guidelines defines a set of authorization flows which can grant API clients access to the API functionality, as outlined in the document CAMARA-API-access-and-user-consent.md. Which specific authorization flows are to be used will be determined during onboarding process, happening between the API Client and the Telco Operator exposing the API, taking into account the declared purpose for accessing the API, while also being subject to the prevailing legal framework dictated by local legislation.

It is important to remark that in cases where personal user data is processed by the API, and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of 3-legged access tokens becomes mandatory. This measure ensures that the API remains in strict compliance with user privacy preferences and regulatory obligations, upholding the principles of transparency and user-centric data control.

Further info and support

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)

Download OpenAPI description
Languages
Servers
Mock server

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}/

3Legged Authentication Flow

Operations

2Legged Authentication Flow

Operations

Retrieve SIM swap date

Operations

retrieveSimSwapDate

Request

Get timestamp of last MSISDN <-> IMSI pairing change for a mobile user account provided with MSIDN.

Security
openId
Headers
Authorizationstringrequired

token to authorize the service

nabApplnClientIdstring

nabApplnClientId

x-correlatorstring

unique trace id to trace end to end system call

x-identity-keystring

invoker's key

x-request-idstring

unique id to trace call between two services

Bodyapplication/jsonrequired

Create a SIM swap date request for a MSISDN identifier.

phoneNumberstring(PhoneNumber)^\+?[0-9]{5,15}$

Subscriber number in E.164 format (starting with country code). Optionally prefixed with '+'.

Example: "+346661113334"
curl -i -X POST \
  https://developers.opgw.u.com.my/_mock/sim-swap/sim_swap/retrieve-date \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'nabApplnClientId: string' \
  -H 'x-correlator: string' \
  -H 'x-identity-key: string' \
  -H 'x-request-id: string' \
  -d '{
    "phoneNumber": "+346661113334"
  }'

Responses

Contains information about SIM swap change

Headers
x-request-idstring

unique id to trace call between two services

x-response-idstring

response id

x-correlatorstring

unique trace id to trace end to end system call

Bodyapplication/json
latestSimChangestring(date-time)required

Timestamp of latest SIM swap performed. It must follow RFC 3339 and must have time zone. Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ (i.e. which allows 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z)

Example: "2023-07-03T14:27:08.312+02:00"
Response
application/json
{ "latestSimChange": "2023-07-03T14:27:08.312+02:00" }

Check SIM swap

Operations