# Postman Collection
source: https://developer.mastercard.com/consent-management/documentation/postman-collection/index.md

## Postman Collection {#postman-collection}

In this tutorial, we will set up Postman to automate the use cases below:

* Create consent for a user using **3DS** authentication.
* Revoke consent post creation.

## Prerequisites {#prerequisites}

1. Create a project on Mastercard developers portal as described in [Project Setup](https://developer.mastercard.com/consent-management/documentation/tutorials/project-setup/index.md). The will generate an authorization certificate(.p12 key file), consumer key and an encryption key.

2. Postman tool.

## API Collection {#api-collection}

Click [here](https://god.gw.postman.com/run-collection/26779181-eedd7b8c-21fc-44d8-b82d-fdd5f29c44a5?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D26779181-eedd7b8c-21fc-44d8-b82d-fdd5f29c44a5%26entityType%3Dcollection%26workspaceId%3D869c2355-d2c8-4738-9505-6ab9514dcffb#?env%5BMastercard%20CBC-Sandbox%5D=W3sia2V5IjoicHVibGljX2NlcnQiLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJkZWZhdWx0In0seyJrZXkiOiJwdWJsaWNLZXlGaW5nZXJwcmludCIsInZhbHVlIjoiIiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6ImRlZmF1bHQifSx7ImtleSI6ImJhc2VVcmwiLCJ2YWx1ZSI6Imh0dHBzOi8vc2FuZGJveC5hcGkubWFzdGVyY2FyZC5jb20vb3BlbmFwaXMvIiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6ImRlZmF1bHQifSx7ImtleSI6ImNvbnN1bWVyS2V5IiwidmFsdWUiOiIiLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoiZGVmYXVsdCJ9LHsia2V5IjoicHJpdmF0ZUtleSIsInZhbHVlIjoiIiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6ImRlZmF1bHQifV0=)
to fork *Consent Management* collection(3DS use case) in your postman account space. Please make sure to log in to your postman account before forking. It will also download the environment: *CBC-Sandbox* with variables required for the collection.
Note: Ensure postman desktop/web is logged in and that the workspace is created to import/fork API collection successfully.

## Edit Environment Variables {#edit-environment-variables}

Go to the *CBC-Sandbox* environment (forked from above step) and update the variables below with values from your [Project Setup](https://developer.mastercard.com/consent-management/documentation/tutorials/project-setup/index.md).

* **private Key:** Use this [reference](https://developer.mastercard.com/platform/documentation/security-and-authentication/using-oauth-1a-to-access-mastercard-apis/#exporting-your-signing-key) to obtain private key content from your project certificate. This will be used for authorization.
* **consumerKey:** Copy it from your project details on <https://developer.mastercard.com/>
* **publicKeyFingerprint:** Copy it from your project details on <https://developer.mastercard.com/>
* **publicCert:** It is available on <https://developer.mastercard.com/> under your project. Open encryption certificate downloaded in a notepad and replace the environment value content with the text.
* **baseUrl:** By default, Mastercard Sandbox environment is used in collection. Change the value as required.

#### API Request Body(Optional) {#api-request-bodyoptional}

By default, the downloaded API collection runs with default request payload embedded within each request body. Optionally, you can change the payload with appropriate data.

You can now run your collection and verify the results or run any individual request in the same order mentioned in the collection to produce the correct results.
