Skip to content
Get started

Authenticate User

POST/profile/authenticate

Perform user authentication, returning a model which includes the users profile and a JWT auth token to re-use in subsequent requests.

Body ParametersJSONExpand Collapse
emailaddress: optional string
password: optional string
ReturnsExpand Collapse
Data: object { access_token, UserProfile }
access_token: string

JWT Bearer Token to use in subsequent authenticated requests

minLength1
UserProfile: object { DateCreated, ID, IsProfilePublic, 11 more }

Full user profile, including non-public fields such as Email Address

DateCreated: string
minLength1
ID: number
IsProfilePublic: boolean
Username: string
minLength1
DateLastLogin: optional string
minLength1
EmailAddress: optional string
minLength1
Latitude: optional number
Location: optional string
minLength1
Longitude: optional number
Permissions: optional string
minLength1
Profile: optional string
minLength1
ProfileImageURL: optional string
minLength1
ReputationPoints: optional number
WebsiteURL: optional string
minLength1
Metadata: object { StatusCode }
StatusCode: number

Authenticate User

curl https://api.openchargemap.io/v3/profile/authenticate \
    -X POST
{
  "Data": {
    "access_token": "x",
    "UserProfile": {
      "DateCreated": "x",
      "ID": 0,
      "IsProfilePublic": true,
      "Username": "x",
      "DateLastLogin": "x",
      "EmailAddress": "x",
      "Latitude": 0,
      "Location": "x",
      "Longitude": 0,
      "Permissions": "x",
      "Profile": "x",
      "ProfileImageURL": "x",
      "ReputationPoints": 0,
      "WebsiteURL": "x"
    }
  },
  "Metadata": {
    "StatusCode": 0
  }
}
Returns Examples
{
  "Data": {
    "access_token": "x",
    "UserProfile": {
      "DateCreated": "x",
      "ID": 0,
      "IsProfilePublic": true,
      "Username": "x",
      "DateLastLogin": "x",
      "EmailAddress": "x",
      "Latitude": 0,
      "Location": "x",
      "Longitude": 0,
      "Permissions": "x",
      "Profile": "x",
      "ProfileImageURL": "x",
      "ReputationPoints": 0,
      "WebsiteURL": "x"
    }
  },
  "Metadata": {
    "StatusCode": 0
  }
}