POST V1 ems/userTokens/createExternal
Creates a user access token for the EMS API, authenticating through a users' domain credentials.
Request Information
Parameters
Name | Description | Additional information |
---|---|---|
model | The model containing the user's credentials. See the request body. |
Define this parameter in the request body. |
Example Request
To get the public key for this server, make the following API call: POST /ems/userTokens/createExternal
Request body formats
application/json, text/json
{ "Username": "ExampleDomain\\User.Name", "Password": "Encrypted password" }
application/xml, text/xml
<UserCredentials xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Unilever.Urdps.Hts.EmsApi.EntityRepresentations.EMS.V1"> <Password>Encrypted password</Password> <Username>ExampleDomain\User.Name</Username> </UserCredentials>
application/x-www-form-urlencoded
Not Supported
Request Detail
Systems require a user access token in order to be able to make calls to the EMS API. This method uses a users' domain credentials to create a user token. Consumers of this API must send down two parameters:
- Username : must be in the form DOMAIN\Username.
- Password : must be encrypted using the supplied public key (which can be obtained from api/userTokens/publicKey).
If the user is currently inside the domain and has, or can obtain, an active Windows session, then this call that uses the Windows session should be used instead.
This endpoint does not require the api-username
or
api-usertoken
headers to be present. If these headers are present, they will be ignored.
This endpoint does not accept data sent using the "x-www-form-urlencoded" scheme, and will return an HTTP 400 (Bad Request) error if an attempt is made to use this formatting.
For more information about the general principles of authenticating with the EMS API, please see this page on Authentication.
Response Information
HTTP Status Codes
Status Code | Meaning |
---|
Response Body Formats
application/json, text/json
{ "Expires": "2014-10-08T17:20:17Z", "Token": "xyz123xyz123xyz123xyz123xyz123xyz123" }
application/xml, text/xml
<UserToken xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Unilever.Urdps.Hts.EmsApi.EntityRepresentations.EMS.V1"> <Expires>2014-10-08T17:20:17Z</Expires> <Token>xyz123xyz123xyz123xyz123xyz123xyz123</Token> </UserToken>