Table of Contents
Overview #
The CAMARA SIM Swap API provides the customer with the ability to obtain information on any recent SIM pairing change related to the User’s mobile account.
The complete definition of the CAMARA API can be found on: https://github.com/camaraproject/SimSwap
Quick Start #
API Service Endpoint #
The API has two defined endpoints:
POST /sim-swap/v0/retrieve-date
: provides timestamp of latest SIM swap, if any, for a given phone number defined in the request with the ‘msisdn‘ attribute.
Demo Server:https://auth.aloaha.com/sim-swap/v0/retrieve-date
POST /sim-swap/v0/check
: checks if SIM swap has been performed during a past period (defined in the request with the ‘maxAge‘ attribute) for a given phone number defined in the request with the ‘msisdn‘ attribute.
Demo Server:https://auth.aloaha.com/sim-swap/v0/check
Code Snippets #
The snippets illustrate REST-based API calls using “curl” to request. The credentials for API authentication should be configured based on the target security system.
# Retrieve Date Code
curl -X 'POST' <base-url>/sim-swap/v0/retrieve-date
-H 'accept: application/json'
-H 'Content-Type: application/json'
-H "Authorization: Bearer <token>"
-d '{ "msisdn":"+35679567034"}'
Result: { "latestSimChange":"2023-08-14T14:30:01.000Z" }
Web Services Wrapper: https://auth.codeb.io/ws/camara.asmx?op=last_sim_swap
# Check code
curl -X 'POST' <base-url>/sim-swap/v0/check
-H 'accept: application/json'
-H 'Content-Type: application/json'
-H "Authorization: Bearer <token>"
-d '{ "msisdn":"+35679567034", "maxAge":"240"}'
Result: {"swapped":false}
Web Services Wrapper: https://auth.codeb.io/ws/camara.asmx?op=check_sim_swap