Number Recycling

Checks whether the subscriber associated with a phone number has changed after a specified date

Anti-Fraud
Network API
Camara
Playground

Introduction

The CAMARA Number Recycling API checks whether the subscriber associated with a phone number has changed after a specified date.

This can help an Application Service Provider (ASP) confirm that a phone number is still associated with the expected user and reduce the risk of sending SMS messages to the wrong person.

The API returns a boolean:

  • false means that no change in the subscriber associated with the phone number was detected after specifiedDate.
  • true means that a change was detected after specifiedDate.

For example, an ASP can check a phone number using the date on which a user signed up for its service. If the number has since been assigned to a different subscriber, the API returns true.

API Authentication

HTTPS requests to the REST API are protected with CIBA 3-Legged OAuth.

Before calling the Number Recycling API, the API Invoker (for example, an application backend or aggregator) must request a Three-Legged Access Token from the Orange Authorization Server. The process follows the OpenID Connect Client-Initiated Backchannel Authentication (CIBA) flow.

This API is always called with a 3-legged access token. The phone number is identified from the access token, so do not include phoneNumber in the API request body.

Step 1: Request backchannel authorization

Send a POST request to the bc-authorize endpoint. The request must include the required parameters and a valid user identifier in login_hint.

The API Invoker provides the application credentials (client_assertion and client_assertion_type) and declares the purpose for processing personal data. For Number Recycling, use the following scope:

openid dpv:FraudPreventionAndDetection number-recycling:check

The current Orange implementation supports the dpv:FraudPreventionAndDetection purpose.

Note on JWT usage via client assertion: client_assertion is a JWT used by the client to authenticate to the authorization server. client_assertion_type identifies the assertion type. The API consumer must configure a JWK keystore in the application settings in Orange Developer.

curl -X POST "https://auth.networkapi.service.orange/realms/osp/protocol/openid-connect/ext/ciba/auth" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'login_hint=tel:+346xxxxxxxx' \
  --data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \
  --data-urlencode 'client_assertion=eyJhbGciOi...zif0Tjxzw' \
  --data-urlencode 'scope=openid dpv:FraudPreventionAndDetection number-recycling:check'

The Orange Authorization Server returns an authorization request ID:

200
Content-Type: application/json
{
  "auth_req_id": "69957d77-fea4-4a4c-8cd2-b29f22e61307",
  "interval": 2,
  "expires_in": 120
}

The authorization request ID may be returned before the end user has provided consent.

Step 2: Request the OAuth access token

After receiving the authorization request ID, send a POST request to the token endpoint to obtain an access token.

curl -X POST "https://auth.networkapi.service.orange/realms/osp/protocol/openid-connect/token" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \
  --data-urlencode 'client_assertion=eyJhbGciOi...zif0Tjxzw' \
  --data-urlencode 'auth_req_id=69957d77-fea4-4a4c-8cd2-b29f22e61307' \
  --data-urlencode 'grant_type=urn:openid:params:grant-type:ciba'

If the transaction succeeds, the response contains an access token:

200
Content-Type: application/json
{
  "access_token": "*****",
  "token_type": "Bearer",
  "expires_in": 119
}

Step 3: Call the protected API

Include the access token in the Authorization header when calling the Number Recycling API.

API Description

Summary of resources

The API exposes one resource: check. It checks whether the subscriber associated with the phone number identified by the access token has changed after a specified date.

Summary of methods and URL

Use caseMethod and URL
Check whether the subscriber associated with the authenticated phone number has changed after a specified datePOST https://networkapi.service.orange/camara/number-recycling/v0.2/check

Number Recycling - Check

Request body parameters

NameDescriptionTypeMandatory
specifiedDateDate after which to check for a change in the subscriber associated with the phone number. Use the YYYY-MM-DD format.string (date)Yes

The phone number is identified from the 3-legged access token. Do not include a phoneNumber field in the request body. Including it when the subject is identified from the token results in 422 UNNECESSARY_IDENTIFIER.

Example request body

{
  "specifiedDate": "2026-10-31"
}

Request

curl -X POST "https://networkapi.service.orange/camara/number-recycling/v0.2/check" \
  --header "Authorization: Bearer {your access token}" \
  --header "Cache-Control: no-cache" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{
    "specifiedDate": "2026-10-31"
  }'

Successful response

A successful request returns whether the subscriber associated with the phone number has changed after the specified date.

200 OK
Content-Type: application/json
{
  "phoneNumberRecycled": true
}
NameDescriptionType
phoneNumberRecycledtrue if the subscriber associated with the phone number changed after specifiedDate; otherwise false.boolean

Most frequent errors

Invalid request

Invalid input can result in a 400 response. The API specification documents INVALID_ARGUMENT and OUT_OF_RANGE as possible error codes.

{
  "status": 400,
  "code": "INVALID_ARGUMENT",
  "message": "Client specified an invalid argument, request body or query param."
}

An OUT_OF_RANGE response may look like this:

{
  "status": 400,
  "code": "OUT_OF_RANGE",
  "message": "Client specified an invalid range."
}

Phone number not found

If the phone number identified from the access token cannot be found, the API can return 404 IDENTIFIER_NOT_FOUND.

{
  "status": 404,
  "code": "IDENTIFIER_NOT_FOUND",
  "message": "Phone number not found."
}

Service not applicable

The API can return 422 SERVICE_NOT_APPLICABLE if the service is not available for the identified phone number.

{
  "status": 422,
  "code": "SERVICE_NOT_APPLICABLE",
  "message": "The service is not available for the provided phone number"
}

Missing or unnecessary identifier

With a 3-legged access token, the phone number must be identified from the token. If it cannot be identified, the API returns 422 MISSING_IDENTIFIER.

{
  "status": 422,
  "code": "MISSING_IDENTIFIER",
  "message": "The phone number cannot be identified"
}

Do not include phoneNumber in the request body. If the phone number is already identified from the access token and the request also includes phoneNumber, the API returns 422 UNNECESSARY_IDENTIFIER.

{
  "status": 422,
  "code": "UNNECESSARY_IDENTIFIER",
  "message": "The phone number is already identified by the access token"
}

Authentication and permission errors

If the access token is missing, invalid, or expired, the API returns 401 UNAUTHENTICATED. Request a valid access token and retry.

{
  "status": 401,
  "code": "UNAUTHENTICATED",
  "message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}

If the client does not have permission to call the API, the API returns 403 PERMISSION_DENIED. Check the application’s API subscription and ensure that the access token has the required scope:

number-recycling:check

{
  "status": 403,
  "code": "PERMISSION_DENIED",
  "message": "Client does not have sufficient permissions to perform this action"
}