REST Authentication

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

Success 200

This call does not have a response output.

Errors 4xx

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.

Login

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

Request

Field Type Description
username String Name of the back end user required
password String Password of the back end user required
null

Success 200

Errors 4xx

This call does not have an error output.

Refresh

Refreshes the access token using the refresh token. The refresh token is part of the login call response.

/rest/login/refresh

Success 200

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.

Errors 4xx

This call does not have an error output.

Logout

Logs out the back end user from plentymarkets. The access token expires.

/rest/logout

Success 200

This call does not have a response output.

Errors 4xx

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

Success 200

Errors 4xx

This call does not have an error output.

/rest/check_pin

Success 200

Errors 4xx

This call does not have an error output.

/rest/check_password

Success 200

Errors 4xx

This call does not have an error output.

Is this article helpful?

 

Thank you for your Feedback

you can close this field now!