Skip to content

Login user

POST
/login
curl --request POST \
--url https://myshop.com/shopgate/v1/login \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "login": "example", "password": "example" }'

Makes an attempt to log in the user. The user can choose between multiple login strategies. A strategy can be ‘basic’ or ‘facebook’ login. After login, the user storage becomes available to store data in a shop-global scope, so it can be shared across devices. Based on the shop, custom errors can be returned to react to in the theme. Calling this pipeline when a user is logged in results in an error.

The response contains the shopping carts system’s user ID for authentication on the Shopgate Connect side.

object
login
required
string
password
required
string
Examplegenerated
{
"login": "example",
"password": "example"
}
Media typeapplication/json
object
userId
required
string
Example
{
"userId": "c069f5a4-94b7-11e8-9eb6-529269fb1459"
}

The login fails because of wrong credentials.

Media typeapplication/json
object
message
string
Example
{
"message": "wrong credentials"
}