Register User API
Purpose: Use this API to register or create a new user with body parameters
Endpoint:
POST /register
Request Details
Request URL:
https://{firebase_id}.cloudfunctions.net/fincurious_cloudAPI/register
Header:
client-id:client123
client-secret:
secret123
Body Parameters: * Required Fields
{ "email": "example@example.com", "name": "John Doe", "phone": "1234567890", "state": "Karnataka", "district": "Bangalore", "module": "Finance", "date": "2024-07-19", "module_minutes": 60 }
Possible operation types:
CREATE : Create or Register New User
Response JSON Keys
Id string
Represents Confirmation ID and Status 201
Possible Errors
INVALID_URL_PATTERN HTTP 404
Please check if the URL trying to access is a correct one
Resolution The request URL specified is incorrect. Specify a valid request URL.
Refer to request
URL section above
CREDENTIAL_MISMATCH HTTP 401
Unauthorized
Resolution The User doesn't have permission to access the data
INTERNAL_ERROR HTTP 500
Internal Server Error
Resolution Unexpected and unhandled exception in the server. Contact support team
INVALID_REQUEST_METHOD HTTP 400
The http request method type is not a valid one
Resolution You have specified an invalid HTTP method to access the API URL. Specify
a valid request method. Refer to endpoints
section above.
Sample Request
curl -X POST \ https://us-central1-your-project-id.cloudfunctions.net/fincurious_cloudAPI/register \ -H "Content-Type: application/json" \ -H "client-id: client123" \ -H "client-secret: secret123" -d '{ "email": "example@example.com", "name": "John Doe", "phone": "1234567890", "state": "Karnataka", "district": "Bangalore", "module": "Finance", "date": "2024-07-19", "module_minutes": 60 }'
Sample Response
{ "id": "example@example.com" }