Get Me

This API will be used to get the latest user data subsequently. It is suggested to store the profile data obtained from Signup / Login API in the local space to display on all the places in app. And instead of using placeholders or preloaders, use that old data from local space until the Get Me API response is pending. As soon as the this API respond, update the profile data in local space hence reflecting on all the places where it's being used for better User Experience.

Endpoint

GET /user/get/me

Payload

No payload required although for successful response, the session-token cookie header must be included in the request headers.

Response

Successful Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 { "success": true, "msg": "You are Logged in successfully !", "user": { "_id": "65ddb7496a09ca290bec88b2", "username": "user_123", "register_provider": "urbanfits", "image": "https://lh3.googleusercontent.com/a/ACg8ocLUFVuvODAyQgKnZQyeKiplTsNvzvJr-DL-eghS5l7YM4Dg1VOi=s96-c", "phone_prefix": "+971", "phone_number": "31643454835", "email": "example@domain.com", "two_fa_enabled": false, "role": "customer", "is_active": true, "uf_wallet": { "card_number": "70517090291921247656", "bar_code": "/uf-wallet-barcodes/70517090291921247656", "last_spin_reward": 200, "last_uf_spin": "2024-05-09T23:59:59.000Z", "next_uf_spin": "2024-05-11T00:00:00.000Z" }, "last_checkin": "2024-05-21T23:59:59.999Z", "timezone": "Asia/Dubai", "user_agent": "eyJhbGciOiJIUzI1NiJ9.UG9zdG1hblJ1bnRpbWUvNy4zNy4z.lYd97Uv60STIestaaO3UO_aiP7G10yEmi_XG22KbOPo", "purchases": 7, "createdAt": "2024-02-27T00:00:00.000Z", "updatedAt": "2024-06-06T12:04:37.382Z", "__v": 0, "firstname": "John", "gender": "male", "lastname": "Doe", "title": "Mr." } }
Invalid Session

In case of absence of session-token in request headers or if the sessions token is expired, then any personalized API return this response indicating that the user session is no longer accepted and user needs to login again.

1 2 3 4 { "success": false, "msg": "Your session is invalid or expired. Please sign in again." }