API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
IndexPublic API
Management APIUsers APIOperations APIMessaging APIReporting APIML APIData API
IndexPublic API
Management APIUsers APIOperations APIMessaging APIReporting APIML APIData API
  1. Authentication
  • Introduction
  • Loyalty Club
    • Loyalty Clubs
      • Introduction
      • Show Loyalty Club
      • List Loyalty Clubs
    • Schema
      • Show Schema
    • Legal Information
      • Show Legal Information
    • Translations
      • List Translations (v4)
      • List Translations (v3)
    • Carbon Offset Program
      • Show Carbon Offset Program Info
    • Cars
      • Show Cars Configuration
      • Show Available Cars Colors
    • Programs
      • Introduction
      • List Programs
      • Show Program
    • Receipts
      • Introduction
      • Show Receipts Configuration
  • Member
    • Authentication
      • OAuth Flow
      • One Time Password
        • Send OTP via SMS
        • Send OTP via SMS by Email
        • Send OTP via Email
        • Send OTP via Email by MSISDN
      • Registration Password
        • Send Registration Password SMS
        • Send Registration Password Email
      • Create Token
        POST
      • Revoke Token
        POST
      • Show Token Info
        GET
    • Profile
      • Public Info
        • Show Member Public Info
        • Show Member Public Info by MSISDN
        • Show Member Public Info by Email
      • Person ID
        • Show Member Person ID
        • Show Member Person ID by MSISDN
        • Show Member Person ID by Email
      • Create Member
      • Update Member
      • Validate Member
      • Register Member App Token
      • Show Member
      • Destroy Member
      • Remove Member Properties
    • Programs
      • Registration
        • Start
        • Confirm
      • Update Member Programs
      • Add Member to Program
      • List Member Programs
      • Remove Member from Program
    • Cars
      • Introduction
      • List Member Cars
      • Create Member Car
      • Show Member Car
      • Update Member Car
      • Renew Member Car
      • Destroy Member Car
      • Lookup a Car
    • Benefits
      • Introduction
      • List Member Benefits
      • Show Member Benefit
    • Verification
      • Send Verification Email
      • Send Verification SMS
      • Verify Email
      • Verify MSISDN
    • Password
      • Update Password
      • Reset Password
      • Send Password Reset Token
    • Integrations
      • Amano Parking Integration
        • Create Card
        • Delete Card
      • Spaycial Integrations
        • Generate Connections URL
        • Generate Connect URL
        • Show Spaycial Connections Status
        • Show Spaycial Feature Settings
        • Update Spaycial Feature Settings
    • Receipts
      • Introduction
      • List Submissions
      • Show Submission
      • Create Submission
      • Update Submission
      • Delete Submission
      • Check Limits Exceeded
    • Misc
      • Checkin to Store
      • Show Messages History
      • Show Messages History (v1)
    • Files
      • Uploads
        • Upload status
        • Start Upload
        • Upload Part
        • Finish Upload
        • Activate Uploaded File
    • Messages
      • Send "delivered" event for push message
      • Send "opened" event for push message
    • Refer A Friend
      • Show Campaign
  • Offers
    • Introduction
    • Offers
      • Show Offers Meta
      • Show Offer
      • Encode Offer
      • List Offers
      • Use Offer
      • Like Offer
      • Unlike Offer
    • Offers Preview
      • Preview Offers Meta
      • Preview Offer
      • Preview Offers List
    • Events
      • Introduction
      • Register "clicked" Event
      • Register "seen" Event
  • Rewards
    • Introduction
    • Rewards Program
      • Show Rewards Program
      • Join To Rewards Program
      • Leave Rewards Program
      • Show Member Rewards Program Status
      • Show Achievements Summary
    • Rewards
      • List Rewards
      • Show Reward
      • List Rewards - Preview
      • List Purchased Rewards
      • Show Purchased Reward
      • Purchase Reward
      • Use Reward
  • Games
    • Introduction
    • Games
      • List Games
      • Show Game Details
      • Show Game Ticket
      • Play Game
      • Issue Game Prize
  • CMS Content
    • Introduction
    • Venue Info
      • Introduction
      • Show Venue Info
    • Components
      • Component Schema Model
      • Show Components Schema
    • Pages
      • Page Model
      • List Pages
      • Show Page
      • Route Page
    • Articles
      • Article Model
      • Articles Categories
        • List Articles Categories
        • Show Articles Categories
      • List Articles
      • Show Article
    • Events
      • Event Model
      • Events Groups
        • Introduction
        • List Events Groups
        • Show Events Group
      • Events Categories
        • List Events Categories
        • Show Events Categories
      • List Events
      • Show Event
    • Job Postings
      • Introduction
      • List Job Postings
      • Show Job Posting
    • Service Messages
      • Introduction
      • List Service Messages
      • Show Service Message
    • Stores
      • Introduction
      • List
      • Show
    • Stores Categories
      • Introduction
      • List Stores Categories
      • Show Stores Category
    • Promotions
      • Introduction
      • List Promotions Collections
      • List Promotions
      • Show Promotion
    • Press Releases
      • Press Release Model
      • List Press Releases
      • Show Press Release
    • Attachments
      • Attachment Model
      • List Attachments
  • Website
    • Introduction
    • Show Website
  • Mobile App
    • Show Homepage
API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
IndexPublic API
Management APIUsers APIOperations APIMessaging APIReporting APIML APIData API
IndexPublic API
Management APIUsers APIOperations APIMessaging APIReporting APIML APIData API
  1. Authentication

Create Token

Pending
POST
https://api.mpc.dev.placewise.com/v3/{loyalty_club_slug}/members/oauth/token
API Permit:BL:Api:Members:OAuth
API Context:Loyalty Club
Authorizations:Token
CAUTION
We highly recommend utilizing our new Member Identity Provider to manage the standard OAuth flow, particularly for new integrations.
For comprehensive technical details, please refer to the Member Identity Provider docs.
Creates a new access token by one of three methods (grant types):
password - token is issued by providing Password,
see: Creating token with password grant
external_token - token is issued by social provider oauth token such as google or apple,
see: Creating token with external token
refresh_token - token is issued by providing refresh token obtained from password grant type,
see: Refreshing token

Body Parameters#

ParameterDescriptionTypeFor grant type
grant_typetype of grantenum: password, refresh_token, external_token-
identifier_typeidentifier type that user should be retrieved byenum: id, email, msisdnpassword
identifiervalue of member identifiermixed (e.g. 134123123, +47123456789 or alice@example.com)password
passwordmember password, One-Time-Password or Registration Passwordstringpassword
external_tokenmember external_token, External Tokenstringexternal_token
external_token_typemember external_token type, allowed values: [google apple]stringexternal_token
refresh_tokenrefresh tokenstringaccess_token

Password#

We allow following password types, depending on Loyalty Club setup:
Member Password
One-Time Password
Registration Password -
may be used to sign in the user right after registration, without sending additional OTP

Response Body#

KeyDescriptionType
access_tokenToken that member can be authenticated withstring
token_typeAlways "bearer"string
expires_inSeconds for how long token will be validinteger (seconds)
refresh_tokenToken that may be used to issue a new :access_tokenstring
created_atWhen the token has been createdinteger (timestamp)
resource_owner_idID of member that the token has been forinteger
In response, two tokens are returned:
access_token that is valid for 24 hours - may be used to authenticate member in member-related actions (see: OAuth).
refresh_token which is valid for 1 year - may be used to get a new access token (with refresh_token grant)
Also, resource_owner_id is returned, it is an ID of member that the token has been issued for.

Error Responses#

StatusReason
461Invalid member credentials provided for password grant. Either member could not be found or password is wrong
462Invalid refresh_token provided for refresh_token grant (may be expired)
463Invalid external_token provided for external_token grant

Example#

Creating token with password grant#

When creating new access token, "grant_type": "password" should be given along with member credentials.

Creating token with external_token grant#

When creating new access token, "grant_type": "external_token" should be given along with member credentials.

Refreshing token with refresh_token grant#

You can obtain a new token after (or before) it's expiration time, by using refresh_token grant.
Param grant_type: "refresh_token" must be provided along with refresh_token: ":refresh_token".
It returns a token response, same as for password or external_id grant, but with new tokens.
When successful, above commands return JSON structured like this:
{
  "access_token": "af9e5361cd7e083dfa4132df3ea7ab82fac21496991632a9994a8c2a9f33884f",
  "token_type": "bearer",
  "expires_in": 86400,
  "refresh_token": "36c636e4290d28488a13691afce351397bec21b1246c2c7896a8262d9bfbc4c4",
  "created_at": 1506523094,
  "resource_owner_id": 42
}

Request

Path Params

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.mpc.dev.placewise.com/v3/infinity-mall/members/oauth/token' \
--header 'X-User-Agent: ApiDog' \
--header 'X-Product-Name: default' \
--header 'X-Loyalty-Club-Slug: infinity-mall' \
--header 'X-Customer: 447' \
--header 'Authorization: Bearer ' \
--header 'X-Client-Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "grant_type": "password",
    "identifier_type": "id",
    "identifier": "",
    "password": ""
}'
Response Response Example
{}
Previous
Send Registration Password Email
Next
Revoke Token
Built with