Account
Register with Google
POST
/api/v1/auth/register/googleCreates a SwiftGoma account from a verified Google ID token. Skips email verification since Google already confirmed the address.
No authentication required
Account creation — tightly limited per IP
Body parameters
idTokenstringrequired | Google Sign-In ID token from the client SDK. |
rolestring | One of BUYER, SELLER, RIDER. Defaults to BUYER. |
deviceNamestring | Human-readable device label for the new session. |
localestring | en or fr. |
Notes
- On web, the access and refresh tokens are set as httpOnly cookies and are not present in the JSON body.
- On mobile clients (sending header x-client-type: mobile), the response body also includes accessToken and refreshToken.
Request
curl --request POST \
--url https://api.swiftgoma.com/api/v1/auth/register/google \
--header 'Content-Type: application/json' \
--data '{
"idToken": "eyJhbGciOiJSUzI1NiIsIn...",
"role": "BUYER",
"deviceName": "Chrome on macOS",
"locale": "fr"
}'201Example response
{
"success": true,
"data": {
"user": {
"id": "3f2a1c9e-7b41-4e2a-9c31-8e6b2d4f10aa",
"name": "Aline Mapendo",
"role": "BUYER",
"email": "aline@example.com",
"isEmailVerified": true,
"phone": "243812345678",
"isPhoneVerified": false,
"createdAt": "2026-01-14T10:32:00.000Z"
}
}
}