User

Use this API to assign user to order.

Assign user - client mode

Only the client needs to be logged in to use this endpoint. The user does not need to be logged in, click here to read more.

Update: Using this endepoint requires configuration of LOGIN_BASE_URL. If isSendMessage is true, then overrideClientId is required. You may check if the credentials (phone number/email) already exits in ConnectID by using Check credential- client mode API.

Use this API to assign user to a previously fulfilled order. If the order was registered using the client order API, you have the option to attach the order to a ConnectID user with a specified credential. To perform this action you provide the credential. The previously created order is attached to the ConnectID user that is specified with the given credential on request. If no user does exist, it will be created based on the provided credential. The user is notified on the attachment via an email or an SMS message if isSendMessage is set as true. The message is composed using a template that must be configured by Mediaconnect support. A part of this message is a link that the user must click in order to login (for existing users) or set password (for new users). This means that you also must supply the returnUrl and errorUrl. These urls are used by our systems to generate the link in the message. Sending of email/SMS is asynchronous. Messages that are sent to the user may be customized for SMS/email. In addition messages may be different for new users that needs to set password or existing users with direct link to login.

SecurityClient_Credentials
Request
path Parameters
orderId
required
string

Used to identify an order.

Request Body schema: application/json
required
credential
required
string <= 60 characters

Credential data - enter value of one of these:

  • Email address
  • Mobile phone number in format E.164
  • Facebook
  • Google
  • aID
  • Egmont ID
  • Coruscant ID
  • LRF Media ID
  • Vipps
recipient
string <= 60 characters

Recipient of message sent to user when user is assigned to order. If field is not set then credential data is used as recipient. Field used when credential is not email/mobile phone number or when recipient has to be different than credential. Email or mobile phone number in format E.164

isSendMessage
boolean
Default: true

It informs if the message is sent to user when user is assigned to order.

  • true: The message is sent to user.
  • false: The message is not sent to user.
returnUrl
string

Return URL (absolute) used in message, i.e link in message, sent to user when user is assigned to order. A URL to redirect the user’s browser back to on success (the user will be logged in).

errorUrl
string

Error URL (absolute) used in message, i.e link in message, sent to user when user is assigned to order. A URL to redirect the user’s browser back to if something goes wrong (the user might not be logged in).

linkLifetime
integer
Default: 12

Decide how long the link sent to user is valid. Lifetime expressed in hours.

overrideClientId
string

This element will override clientId (e.g. no.mediaconnect.test) used in redirect link sent to user. A typically usecase is when a client uses this API on behalf of another client (e.g. a telemarketing bureau). ClientId using API and overrideClientId must have the same handler and partner id. The overrideClientId must exist in ConnectID. This field have to be set if we need to send message with proper login url for specific client.

Responses
200

OK

Response Schema: application/json
orderId
integer

Order Id

uniqueUserId
string

Unique user Id

isNewUser
boolean

It informs if the user is new.

  • true: The user is new
  • false: The user is not new.
isPasswordSet
boolean

It informs if user has a password set

  • true: The user has a password set.
  • false: The user has not a password set.
400

Bad Request

429

Too Many Requests

500

Internal Server Error

post/v1/client/order/{orderId}/user
Request samples
application/json
{
  • "credential": "+4712345678",
  • "isSendMessage": true,
  • "returnUrl": "www.mediaconect.no/...",
  • "errorUrl": "www.mediaconect.no/...",
  • "linkLifetime": 2,
  • "overrideClientId": "no.mediaconnect"
}
Response samples
application/json
{
  • "orderId": 14,
  • "uniqueUserId": "f21942404003447993b198bdd7ba2ef4",
  • "isNewUser": true,
  • "isPasswordSet": false
}