REST Authentifizierung (EN)

API authentication

For each access to the WEBSALE API the user has to be authenticated. You can use your normal OSB credentials for this purpose.

If you would like to use separate credentials for the WEBSALE API or have problems with authentication, please contact our back office.

TOKEN request

For authentication the OSB login data and the ShopID have to be passed.

Request

POST https://www.websale.de/api/authent/login/SHOPID

Content-Type

application/json

Request-Body

Property

Type

Description

Property

Type

Description

username

string

User ID which is also used for authentication in the OSB

password

string

Password which is also used for authentication in the OSB

Example

In this example the user "websaleuser" is authenticated with the password "mypassword".

{ "username": "websaleuser", "password": "meinpasswort" }

Response

If successful, a TOKEN is returned.

{ "token": "TOKEN" }

Possible errors

Status code

Meaning

Description

Status code

Meaning

Description

400

Bad request

Transfer is not correct (formatting error/missing fields) or unknown action

401

Unauthorized

User has no permissions for the specified ShopID

403

Forbidden

Unknown or wrong login data

423

Locked

User was temporarily put on the blacklist because of multiple incorrect logins

Curl example

The user "websaleuser" is to be authenticated for the ShopID "meinshop".

Use authorization token

The TOKEN is passed in the header for each subsequent call.

 

The generated token is only valid for a period of 30 minutes. As soon as it is no longer valid, all requests return the status code 401. If this is the case, a new token must be generated.