Auth
Function-calling namespace: auth
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
forgotPassword
Source: backend/endpoints/auth/forgot-password
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
email | string | Yes | |
callbackUrl | string | No | - |
callback_url | string | No | - |
debug | boolean | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auth",
"apiName": "forgotPassword",
"data": {
"email": "user@example.com"
}
}'Example Response
{ "status": "ok", "data": {} }googleSignUp
Source: backend/endpoints/auth/google-sign-up
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
redirectUri | string | Yes | - |
redirect_uri | string | No | - |
state | string | No | - |
providerScope | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auth",
"apiName": "googleSignUp",
"data": {
"redirectUri": "value"
}
}'Example Response
{ "status": "ok", "data": {} }googleSignUpCallback
Source: backend/endpoints/auth/google-sign-up-callback
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
code | string | Yes | - |
redirectUri | string | Yes | - |
redirect_uri | string | No | - |
codeVerifier | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auth",
"apiName": "googleSignUpCallback",
"data": {
"code": "value",
"redirectUri": "value",
"codeVerifier": "value"
}
}'Example Response
{ "status": "ok", "data": {} }login
Source: backend/endpoints/auth/login
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
email | string | No | - |
username | string | No | - |
phone | string | No | - |
password | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auth",
"apiName": "login",
"data": {
"password": "value"
}
}'Example Response
{ "status": "ok", "data": {} }resetPassword
Source: backend/endpoints/auth/reset-password
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
code | string | Yes | - |
password | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auth",
"apiName": "resetPassword",
"data": {
"code": "value",
"password": "value"
}
}'Example Response
{ "status": "ok", "data": {} }sendOtp
Source: backend/endpoints/auth/send-otp
Generates an OTP for the provided mobile number. The current implementation returns a dummy OTP in the response for development/testing.
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
mobileNumber | string | Yes | - |
phone | string | No | - |
countryCode | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auth",
"apiName": "sendOtp",
"data": {
"mobileNumber": "9876543210",
"countryCode": "+91"
}
}'Example Response
{ "status": "ok", "data": {} }signUp
Source: backend/endpoints/auth/sign-up
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
email | string | Yes | |
phone | string | No | - |
password | string | Yes | - |
name | string | No | - |
verificationCallbackUrl | string | No | - |
verification_callback_url | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auth",
"apiName": "signUp",
"data": {
"email": "user@example.com",
"password": "value"
}
}'Example Response
{ "status": "ok", "data": {} }verifyOtp
Source: backend/endpoints/auth/verify-otp
Verifies the OTP for the provided mobile number. For now, this API accepts the static OTP 123456; this is intended to be replaced by real OTP provider verification later.
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
mobileNumber | string | Yes | - |
phone | string | No | - |
countryCode | string | No | - |
otp | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auth",
"apiName": "verifyOtp",
"data": {
"mobileNumber": "9876543210",
"countryCode": "+91",
"otp": "123456"
}
}'Example Response
{ "status": "ok", "data": {} }