Skip to content

Latest commit

 

History

History
81 lines (67 loc) · 2.1 KB

UpdateUserProfile.md

File metadata and controls

81 lines (67 loc) · 2.1 KB

Update profile data for authenticated user

Update use profile and return information about the currently authenticated user: profile, experience and membership data. Firebase tokens (iOS and Android) are used by push notifications.

HTTP Request

POST musora-api/profile/update

Permissions

- Only authenticated user
Type Key Required Notes
body file no Avatar URL
body phone_number no User's phone number
body display_name no User's display name
body firebase_token_ios no iOS Firebase token
body firebase_token_android no Android Firebase token

Request Example:

$.ajax({
    url: 'https://www.domain.com' +
        '/musora-api/profile/update',
    type: 'post',
    dataType: 'json',
    data:{
        "display_name":"Test user"
    },
    success: function(response) {
        // handle success
    },
    error: function(response) {
        // handle error
    }
});

Response Example (200):

{
  "id": 424855,
  "wordpressId": null,
  "ipbId": null,
  "email": "[email protected]",
  "permission_level": null,
  "login_username": "[email protected]",
  "display_name": "Test user",
  "first_name": null,
  "last_name": null,
  "gender": null,
  "country": null,
  "region": null,
  "city": null,
  "birthday": "",
  "phone_number": null,
  "bio": null,
  "created_at": "2021-03-17 15:29:59",
  "updated_at": "2021-03-17 15:29:59",
  "avatarUrl": "https://s3.amazonaws.com/pianote/defaults/avatar.png",
  "totalXp": "0",
  "xpRank": "Enthusiast I",
  "isEdge": true,
  "isEdgeExpired": false,
  "edgeExpirationDate": null,
  "isPackOlyOwner": true,
  "isAppleAppSubscriber": false,
  "isGoogleAppSubscriber": false
}