Get User Subscription API
POST /userSubscription
Description
This API endpoint retrieves detailed information about the current subscription of the authenticated user.
Request Body
The request utilizes GraphQL to perform the userSubscription
query.
Query:
query userSubscription {
userSubscription {
duration
multiLoginCount
expiresAt
createdAt
updatedAt
dailyBandwidth
downloadUpload
}
}
Variables:
{}
Example Request:
curl --location '' \
--header 'Content-Type: application/json' \
--data '{"query":"query userSubscription {\n userSubscription {\n duration\n multiLoginCount\n expiresAt\n createdAt\n updatedAt\n dailyBandwidth\n downloadUpload\n }\n}","variables":{}}'
Response:
-
Success (200 OK):
- The response contains detailed subscription information about the authenticated user.
{
"data": {
"userSubscription": {
"duration": "<Subscription_Duration>",
"multiLoginCount": "<Multi_Login_Count>",
"expiresAt": "<Expiration_Date>",
"createdAt": "<Creation_Date>",
"updatedAt": "<Update_Date>",
"dailyBandwidth": "<Daily_Bandwidth>",
"downloadUpload": "<Download_Upload>"
}
}
} -
Error (4XX/5XX):
- If there is an issue with retrieving the subscription data, such as authentication errors or server errors, the response will include an appropriate error message and status code.
Note:
Ensure the request is authenticated, as this query requires user authentication to return the correct subscription details.