Tokens

Realtime token authorization on ChargeIndia Hub.

Endpoints

MethodPathCallerDescription
PUT/ocpi/2.2.1/tokens/{cc}/{pid}/{token_uid}/authorizeeMSPAuthorize token at CPO

Hub role: RECEIVER (eMSP calls Hub; Hub forwards to CPO)

Flow

eMSP → Hub: PUT .../authorize
Hub → CPO: PUT .../authorize (realtime)
CPO → Hub: authorization result
Hub → eMSP: authorization result

Request example

PUT /ocpi/2.2.1/tokens/IN/ABC/TOKEN001/authorize
Authorization: Token {emsp-token}
Content-Type: application/json

{
  "location_id": "LOC001",
  "evse_uids": ["EVSE001"]
}

Response example

{
  "status_code": 1000,
  "data": {
    "allowed": "ALLOWED",
    "token": {
      "uid": "TOKEN001",
      "type": "RFID",
      "contract_id": "CONTRACT001"
    },
    "location": { ... },
    "authorization_reference": "AUTH-REF-001"
  }
}

Authorization results

ValueMeaning
ALLOWEDToken authorized for charging
BLOCKEDToken explicitly blocked
NOT_ALLOWEDToken not valid at this location
UNKNOWNCPO could not determine (often unreachable)

Rate limit

100 requests/minute per party.

Routing

Authorization is forwarded only to CPOs with active routing rules for the eMSP.

OCPI spec

See OCPI 2.2.1 Tokens module for full authorization request/response objects.