.wpb_animate_when_almost_visible { opacity: 1; }

Network APIs Playground - Sim Swap 1.0

This API enables developers to prototype and validate various use cases in real-time, without impacting live systems. It provides mock up of all Network APIs following CAMARA standard.

Contact us

Getting started



Disclaimer (sandboxed version)

This Network APIs Playground - SimSwap API is a mocked version of the production-grade CAMARA - SimSwap API.

To use this API, subscribe to Network APIs Playground

This playground version provides responses for:

  • predefined phone numbers associated with the unassigned country code +990 (e.g +99012345678)
  • user-defined phone numbers added using the Network APIs Playground - Admin

Introduction

The CAMARA SimSwap API performs real-time checks on the activation date of a SIM card on the Orange mobile network. It reveals if an individual mobile line has been ported to another SIM card.

Subscribe to the API

You get the Authorization header credentials when you register your application on the Orange Developer Console.

API Authentication

Note: In production environment the SimSwap API will require a 3-Legged OAuth 2.0 flow but as this implementation is provided on Orange Lab, the API works with a 2-Legged OAuth.

HTTPS requests to the REST API are protected with 2-Legged OAuth. To learn more about how Orange Developer handles authentication, please refer to our documentation.

In short, you will use your Orange Developer Authorization header as authorization_header for the Basic authentication with Orange Developer.

curl -X POST \
-H "Authorization: {{ authorization_header }}" \
-d "grant_type=client_credentials" \
https://api.orange.com/camara/playground/openidconnect/v1.0/token

In response, you will get an access_token.

{
       "token_type": "Bearer",
       "access_token": "66AeYJF8eJQ...2SjkFg9LB1LePC",
       "expires_in": "3600"
}

Go up

API Description

Summary of resources

This API has two resource check and retrieve-date

Summary of methods and URL

Use case of operationURL method
I want to check if the mobile line (identified with a phone number) has changed sim from now -(max-age) to now.POST "https://api.orange.com/camara/playground/api/sim-swap/check/v1
I want to get last sim swap date for a mobile line (identified with a phone number).POST "https://api.orange.com/camara/playground/api/retrieve-date/v1

Go up

Summary of request body parameters

As only check resource is provided, following documentation will only cover this resource.

NameDescriptionTypeMandatory
phoneNumberSubscriber number in E.164 format (starting with country code). Must be prefixed with '+'stringYes
maxAgeDefines the period to be checked; This period is from now - max_age to now. If 240 is passed, server will check if a sim swap was performed on this last during last 10 days (240 hours). if not valued, default value is 240.integerNo

Request mobile sim swap check (from phone number)

Request
curl -X POST "https://api.orange.com/camara/p/sim-swaplayground/api/v1/check"
-H "Authorization: Bearer {your access token}"
-H "Cache-Control: no-cache"  
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d  '{
"phoneNumber": "+33699901031",
"maxAge": 240
}
Response
200 
Content-Type: application/json
{
  "swapped": false
}

Go up

Fields description

The response features only one attribute: swapped.

This attribute is boolean indicating if a sim swap has been done during the provided checking period.

Go up

Most frequent errors

If invalid or incomplete input are provided - in particular for the max_age (should between 1 to 2160) a 400 error is triggered.

HTTP/1.1 400 Error: bad Request
Content-Type: application/json
{

  "status": 400,
  "code": "INVALID_INPUT",
  "message": "[checkSimSwap.createCheckSimSwap.maxAge: must be less than or equal to 2400]"

}

If the phone number is not managed by Orange lab, error code 422 is retrieved.

HTTP/1.1 422 Error: Resource Not Found
Content-Type: application/json
{
  "status": 422,
  "code": "NOT_SUPPORTED",
  "message": "Service not supported for this phoneNumber"
}

There are some cases where your client application will no longer gain access to API resources, and get an error back.

Please check the following points:

  • Here, you attempt to use an expired or revoked access_token and you get an invalid token error. You will have to request a new access_token. As an example:
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
  "code": "UNAUTHORIZED",
  "message": "Authorization failed: ..."
}
  • Here, you removed your subscription to the API so that the capability to generate an access_token is not allowed anymore. As an example:
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
  "code": "FORBIDDEN",
  "message": "Operation not allowed: ..."
}

Looking for support ?

Facing technical issue when using this API ? please contact us

Go up

History of document

Version of the documentmodification datedescription of modifications
1.004/02/2025initialization by Orange CAMARA APIs team for version 1.0

Go up