Creates a Bearer token required to authorize Platform API calls using user credentials.
Success response schema:
interface res {
access_token: string
token_type: string = 'Bearer'
expires_in: number
refresh_token: string
scope: string
created_at: number
}
Failure response schema: Error schema
Example:
const token = await client.authentication.getUserToken({
client_id: '7ZY15L7crVZul8i3PZPrnpOkEURK7xnXEWRZdE6K39M',
client_secret: 'cxMZ0tbe604qj_13hibNmc3GDsXUQfpzHt9PvweihFc',
username: 'spree@example.com',
password: 'spree123'
})
Refreshes the Bearer token required to authorize OAuth API calls.
Success response schema:
interface res {
access_token: string
token_type: string = 'Bearer'
expires_in: number
refresh_token: string
scope: string
created_at: number
}
Failure response schema: Error schema
Example:
const token = await client.authentication.refreshUserToken({
refresh_token: 'aebe2886d7dbba6f769e20043e40cfa3447e23ad9d8e82c632f60ed63a2f0df1'
})
Protected
spreeOptional
tokens: ITokenOptional
params: anyOptional
responseParsing: ResponseParsingProtected
classifyProtected
processProtected
processProtected
spreeGenerated using TypeDoc
Creates a Bearer token required to authorize Platform API calls using application credentials.
Success response schema:
Failure response schema: Error schema
Example: