The Authentication module provides routes for logging in and out back end users, requesting the access token and refreshing the access token. The access token is required for REST calls that are only permitted for logged in users.
/rest/user
Code | Exception | Description |
---|---|---|
401 | League\OAuth2\Server\Exception\AccessDeniedException |
The resource owner or authorization server denied the request. |
401 | League\OAuth2\Server\Exception\InvalidRequestException |
The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter. |
Logs in to plentymarkets with your back end user credentials. The login call returns a JSON object that contains information, such as the access token and the refresh token.
/rest/login
Field | Type | Description |
---|---|---|
username | String |
Name of the back end user required |
password | String |
Password of the back end user required |
Refreshes the access token using the refresh token. The refresh token is part of the login call response.
/rest/login/refresh
Field | Type | Description |
---|---|---|
accessToken | String |
The access token. Required for REST call authentication. |
tokenType | String |
The token type. The token type is Bearer. |
expiresIn | Int |
The expiration time in seconds that the access token is valid for |
refreshToken | String |
The refresh token. Required for refreshing the access token. |
Logs out the back end user from plentymarkets. The access token expires.
/rest/logout
Code | Exception | Description |
---|---|---|
401 | League\OAuth2\Server\Exception\AccessDeniedException |
The resource owner or authorization server denied the request. |
401 | League\OAuth2\Server\Exception\InvalidRequestException |
The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter. |
/rest/quick_login
/rest/check_pin
/rest/check_password