Generate User SDK Token — API
Generates or replaces the SDK token for a specified user using their UUID. Returns the token and associated user, business unit, terminal, device, and active-status information, with documented 200 OK and 400 Bad Request responses.
1. Overview
Generates or replaces the SDK token associated with a specified user.
This endpoint uses the user's UUID to generate or replace their SDK token and returns the associated user, business unit, terminal, and device information, along with the token's active status.
2. Endpoint Details
| Property | Value |
|---|---|
| HTTP Method | POST |
| Endpoint | /api/v1/sdk-token/USERID |
| Production Base URL | https://app-api.edfapay.com |
| Request Body | None specified |
| Access Level | Not specified in the provided API reference |
3. Authentication
Include the API key in the request headers, as required by the API configuration.
| Header | Value |
|---|---|
X-API-KEY | YOUR_API_KEY |
Accept | */* |
4. Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | String (UUID) | Yes | Unique identifier of the user for whom the SDK token will be generated or replaced. |
Example:
3fa85f64-5717-4562-b3fc-2c963f66afa6
5. Request Example
cURL
curl --request POST \
--url 'https://app-api.edfapay.com/api/v1/sdk-token/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
--header 'X-API-KEY: YOUR_API_KEY' \
--header 'Accept: */*'Replace the sample UUID with the actual userId.
6. Responses
6.1 HTTP 200 — OK
Description: The request was processed successfully.
Example response:
{
"code": 0,
"message": "string",
"errorCode": "string",
"data": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"token": "string",
"userBusinessUnitId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"userType": "SUPER_ADMIN",
"terminalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"trsm": "string",
"deviceId": "string",
"active": true
}
}Response Fields
| Field | Type | Description |
|---|---|---|
code | Number | API response code. |
message | String | Response message. |
errorCode | String | Error identifier, where applicable. |
data.userId | UUID | User identifier. |
data.token | String | Generated or replaced SDK token. |
data.userBusinessUnitId | UUID | Associated business unit identifier. |
data.userType | String | User role or type. The example shows SUPER_ADMIN. |
data.terminalId | UUID | Associated terminal identifier. |
data.trsm | String | Terminal serial number or identifier used by the system. |
data.deviceId | String | Associated device identifier. |
data.active | Boolean | Indicates whether the returned record is active. |
6.2 HTTP 400 — Bad Request
Description: The request could not be processed because of invalid input or another request-related issue.
Example response:
{
"code": 0,
"message": "string",
"errorCode": "string",
"data": {}
}The values shown are Swagger placeholders and may differ from actual runtime responses.
7. Implementation Notes
- Provide a valid UUID in the
userIdpath parameter. - Include the required authentication header.
- Handle unsuccessful requests using the returned HTTP status and response details.
- Treat the SDK token as sensitive information and avoid exposing it in logs or sharing it with unauthorized parties.
- The provided API reference does not specify token expiration, replacement behavior for existing tokens, or whether generating a token invalidates a previously issued token.
8. Summary
This endpoint generates or replaces the SDK token associated with a specified user and returns the token together with the related user, business unit, terminal, and device information.
Updated 25 days ago