My Profile

Reminder: if you are using an app/client ID in sandbox, you must use sandbox.motar.io as the endpoint for your requests. Requests to api.motar.io with a sandbox client ID will fail!

Warning: A user can access their profile information in your application but the application can NOT store the data.

Example: a user can see their name, photo, email, and other personally identifiable items in your application but you cannot store this in a local app store to send the user emails or manage them by name in your application database. If your application needs to store app specific user data, it can store non profile information with reference to the userId.

Storage of user profile data other than the app specific userId is against MOTAR platform policies and terms.

Get My Profile

GET https://api.motar.io/user/v1/my/profile

Retrieves the MOTAR profile of the logged in user. Also includes trainer/trainee flags that do not appear on other profiles.

Headers

NameTypeDescription

Authorization

string

Auth token generated via the OAuth login flow.

{
    "handle": "@testadult-testerson",
    "firstName": "Hannah",
    "lastName": "Testerson",
    "userType": "adult",
    "accountType": "Parent",
    "country": "US",
    "profilePic": "60a3c30b3cbcc6cabd0e373b",
    "coverPhoto": "60a3c30b3cbcc6cabd0e373d",
    "userId": "e6bf39b240cf54054c86b620f2d4d46766ed763bea1258b3f135c7ea276493217e50ebb672d3f535772f02ed0dd3ac354d6c8e2e2d93681668bbbe6c9a82de3be152e07f76c9c362a9c743af8266e0f243$c0ed635064fe99865114d78db939357d",
    "position": null,
    "role": null,
    "organizationRoles": {
        "afsc": "1A0X1"
    },
    "email": "adult-Testerson@test.com",
    "trainer": false,
    "trainee": false,
    "militaryGrade": "E-2",
    "displayRank": "Airman",
    "gender": "female",
    "displayDutyTitle": "Command Post Controller",
    "civilianGrade": "GS",
    "civilianBand": "6",
    "jobSeriesNumber": "1550",
    "jobTitle": "Computer Science"
}

Get My Friends

GET https://api.motar.io/user/v1/my/friends

Retrieves the MOTAR profiles of the logged in users friends.

Headers

NameTypeDescription

Authorization

string

Auth token generated via the OAuth login flow.

[ 
  { 
    handle: '@testkid-testerman2',
    firstName: 'Rachel',
    lastName: 'Testerman',
    userType: 'child',
    accountType: 'Kid',
    country: 'US',
    profilePic: '5c532e2da8f7b76d56d73669',
    coverPhoto: '5c532e2da8f7b76d56d7366a',
    userId: '4f7395ab0bf127088e27abc6da009ad46d45d46d41e0d1d745099845c07a47177938416673bea5d55cb9e32caf9cddffae2aea3224711c794583a089716072a05b5e46d2c8f9a67604136f21279a9cc1ac$1107f8967b65d027af29876590b78f8a',
    anonymous: false,
    parentFlags: { cameraDisabled: false, proximityFriends: false },
    "displayDutyTitle": "Command Post Controller",
    "gender": "female",
    "civilianGrade": "GS",
    "civilianBand": "6",
    "jobSeriesNumber": "1550",
    "jobTitle": "Computer Science"
  }, { 
    handle: '@testkid-testerman1',
    firstName: 'Rachel',
    lastName: 'Testerman',
    userType: 'child',
    accountType: 'Kid',
    country: 'US',
    profilePic: '5c532e2da8f7b76d56d73669',
    coverPhoto: '5c532e2da8f7b76d56d7366a',
    userId: '4f7395ab0bf127088e27abc6da009ad46d45d46d41e0d1d045099845c07a47177938416673bea5d55cb9e32caf9cddffae2aea3224711c794583a089716072a05b5e46d2c8f9a67604136f21279a9cc1ac$1107f8967b65d027af29876590b78f8a',
    anonymous: false,
    parentFlags: { cameraDisabled: false, proximityFriends: false },
    "militaryGrade": "E-2",
    "displayRank": "Airman",
    "gender": "female",
    "displayDutyTitle": "Command Post Controller"
  }
]

Get My Profile Picture

GET https://api.motar.io/user/v1/my/profile/picture

Retrieves the image data of the logged in user's profile picture.

Headers

NameTypeDescription

Authorization

string

Auth token generated via the OAuth login flow.

Base64 encoded JPG data.

Get My Cover Photo

GET https://api.motar.io/user/v1/my/profile/cover

Retrieves the image data of the logged in user's cover photo.

Headers

NameTypeDescription

Authorization

string

Auth token generated via the OAuth login flow.

Base64 encoded JPG data.

Create Anonymous User

PUT https://api.motar.io/user/v1/my/profile

Creates an anonymous account, which can be used by an app in place of a full-fledged profile for uses who have not gone through the MOTAR signup process. Note that if that app fails to refresh an anonymous user's session or logs them out in some way the user will have to create a new anonymous profile.

Request Body

NameTypeDescription

anonymous

boolean

Must be "true"

clientId

string

Your app's client ID from MOTAR Studio

dateOfBirth

string

A date string representing the user's date of birth. This is required so we can create the appropriate type of account for this user.

deviceToken

string

An IOS device token or Android registration ID to use for push notifications for this user.

{ handle: '@anon-774dec2b327e6fa73e5e36c00c9c7fbe35207ec8963fb94020f7bf667ad1e94c',
  userType: 'teen-minor',
  accountType: 'Adult',
  country: 'US',
  profilePic: null,
  coverPhoto: null,
  userId: '94aaa8e477bfe1330f68ebd4dfbd1a1c4bd2ed3fa21737db33ed93316e74e77a1704329ca1584d332b5b3efd9f2efaf4b788a1d1ccdbf307498e91ca3fb01ee6c117cf49f139b8aa49ae5406b1b39fbb2a$e51d20b8b1088fcb45b982f9aa19ddfa',
  anonymous: true }

Last updated