Create a Test User
Process
You should follow these steps to generate a Test User:
- Review the Create Test User API documentation on the Developer Hub.
- Make sure that your application is subscribed to the Create Test User API. You can find this under ‘Manage API subscriptions’ on the Developer Hub, in the ‘APIs for testing your service’ section.
- Use Postman or curl to call the Create a test user which is an organisation endpoint.
Use Client ID and Client secret as client credentials to generate an application-restricted access token.
For example:POST /oauth/token HTTP/1.1 Content-Type: application/x-www-form-urlencoded Host: test-api.service.hmrc.gov.uk grant_type=client_credentials&client_id=[YOUR-CLIENT-ID]&client_secret=[YOUR-CLIENT-SECRET]Copy that token
In the body of the request
- Use serviceNames: “excise-movement-control-system”
- For exciseNumber: use the Test User’s Excise ID - e.g. consignor ID, consignee ID or warehouse keeper ID
For example:
POST /create-test-user/organisations HTTP/1.1 Accept: application/vnd.hmrc.1.0+json Authorization: Bearer [YOUR-APPLICATION-RESTRICTED-ACCESS-TOKEN] Content-Type: application/json Host: test-api.service.hmrc.gov.uk { "serviceNames": [ "excise-movement-control-system" ], "exciseNumber": "[YOUR-EXCISE-NUMBER]" }A successful response will return a Test User’s details. Take a note of the user ID and the password for the next step in the testing process.