Skip to content

Commit

Permalink
feat(test): adding account check collection for us
Browse files Browse the repository at this point in the history
  • Loading branch information
TruptiShrimant committed Dec 29, 2023
1 parent 9b737b9 commit 2b4eb5c
Showing 1 changed file with 363 additions and 0 deletions.
363 changes: 363 additions & 0 deletions accounts/Account Check US.postman_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,363 @@
{
"info": {
"_postman_id": "98ab99e8-bc9b-4c8d-ab7a-47b6ffd4d40e",
"name": "Account Check US",
"description": "Welcome to Tink’s Postman collection for Account Check.\n\nFor detailed information on how to use Account Check, visit [Fetch your first Account Check report](https://docs.tink.com/resources/account-check/verify-your-first-account).\n\nThe documentation in this Postman collection shows how you get your Tink variables and enter them in Postman to be able to use this collection.\n\nMake sure that you have created your Tink Console account. This is where you find your API credentials, for example `client_id` and `client_secret`, and create and manage your apps. If you haven't created a Console account and an app, go to [Set up your Tink Console account](https://docs.tink.com/resources/landing/set-up-your-tink-account) and follow the instructions to set up an account and create your first app.\n\nIn Postman, go to the **Variables** tab, which should be the one with a green dot next to it. This tab contains four variables. The rest of this documentation shows how to retrieve these values.\n\nMake sure that you enter all of your variables in the **CURRENT VALUE** column.\n\nEnter the `client_id` and `client_secret` values from your Console app.\n\nTo get the `report_id` value, you must build a Tink Link URL. To do this, open Console and go to **Account Check** > **Tink Link**, and create your own Tink Link. These steps are required for providing consent to a financial institution, so that Tink can connect and retrieve account data. At the bottom of the page, select **Preview** and follow all steps on the Tink Link page that opens in a new window. At the end of a successful authorization flow, the **Account Check successful** page displays your `account_verification_report_id`. Copy this code, go to Postman, and paste it into the variables field for `report_id`.\n\nMake sure that all of your variables are entered into the **CURRENT VALUE** column. Select **Save** (or Ctrl+S).\n\nWhen you've entered all your variables except for `access_token`, run the **POST** command to exchange your `code` for an `access_token`. The value for `access_token` is automatically entered into your list of variables.\n\nConfirm that your `access_token` has been added to your list of variables. Use your `access_token` any number of times to run the **GET** commands to fetch a report.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Setting up Continusous Access",
"item": [
{
"name": "1. Authorize app",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"pm.environment.set(\"access_token\", jsonData.access_token);"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "client_id",
"value": "{{client_id}}",
"description": "Client Id is the unique ID for your app",
"type": "default"
},
{
"key": "client_secret",
"value": "{{client_secret}}",
"description": "Client Secret is the unique secret for you client",
"type": "default"
},
{
"key": "grant_type",
"value": "client_credentials",
"type": "default"
},
{
"key": "scope",
"value": "user:create,authorization:grant",
"type": "default"
}
]
},
"url": {
"raw": "https://api.us.tink.com/api/v1/oauth/token",
"protocol": "https",
"host": [
"api",
"us",
"tink",
"com"
],
"path": [
"api",
"v1",
"oauth",
"token"
]
},
"description": "Welcome to Tink’s Postman collection for Account Check.\n\nFor detailed information on how to use Account Check, visit [Fetch your first Account Check report](https://docs.tink.com/resources/account-check/verify-your-first-account).\n\nThe documentation in this Postman collection shows how you get your Tink variables and enter them in Postman to be able to use this collection.\n\nMake sure that you have created your Tink Console account. This is where you find your API credentials, for example `client_id` and `client_secret`, and create and manage your apps. If you haven't created a Console account and an app, go to [Set up your Tink Console account](https://docs.tink.com/resources/landing/set-up-your-tink-account) and follow the instructions to set up an account and create your first app.\n\nIn Postman, go to the **Variables** tab, which should be the one with a green dot next to it. This tab contains four variables. The rest of this documentation shows how to retrieve these values.\n\nMake sure that you enter all of your variables in the **CURRENT VALUE** column.\n\nEnter the `client_id` and `client_secret` values from your Console app.\n\nTo get the `report_id` value, you must build a Tink Link URL. To do this, open Console and go to **Account Check** > **Tink Link**, and create your own Tink Link. These steps are required for providing consent to a financial institution, so that Tink can connect and retrieve account data. At the bottom of the page, select **Preview** and follow all steps on the Tink Link page that opens in a new window. At the end of a successful authorization flow, the **Account Check successful** page displays your `account_verification_report_id`. Copy this code, go to Postman, and paste it into the variables field for `report_id`.\n\nMake sure that all of your variables are entered into the **CURRENT VALUE** column. Select **Save** (or Ctrl+S).\n\nWhen you've entered all your variables except for `access_token`, run the **POST** command to exchange your `code` for an `access_token`. The value for `access_token` is automatically entered into your list of variables.\n\nConfirm that your `access_token` has been added to your list of variables. Use your `access_token` any number of times to run the **GET** commands to fetch a report."
},
"response": []
},
{
"name": "2. Create User",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"pm.environment.set(\"user_id\", jsonData.user_id);"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {}
},
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"external_user_id\": null,\n \"market\": \"US\", \n \"locale\": \"en_US\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://api.us.tink.com/api/v1/user/create",
"protocol": "https",
"host": [
"api",
"us",
"tink",
"com"
],
"path": [
"api",
"v1",
"user",
"create"
]
},
"description": "Create User API endpoint call with a way to identify the user and the market."
},
"response": []
}
]
},
{
"name": "Generate the Reports",
"item": [
{
"name": "1. Generate Authorization Code",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"type": "text"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "actor_client_id",
"value": "df05e4b379934cd09963197cc855bfe9",
"description": "This value never changes and is used by Tink to identify apps. Once you declare the value, you allow Tink to act on your behalf.",
"type": "text"
},
{
"key": "user_id",
"value": "{{user_id}}",
"description": "You can use the user_id or the external_user_id ",
"type": "text"
},
{
"key": "id_hint",
"value": "End user name/username",
"description": "The id_hint is a value that will be presented to the end-user in Tink Link, to be able to verify the identity of the actual user they are interacting with and prevent URL spoofing attacks. It can be any arbitrary string value that is recognizable to the end-user, such as the user’s full name or email.",
"type": "text"
},
{
"key": "scope",
"value": "authorization:read,authorization:grant,credentials:refresh,credentials:read,credentials:write,providers:read,user:read,accounts:read",
"type": "text"
},
{
"key": "external_user_id",
"value": "{{external_user_id}}",
"description": "You can use the user_id or the external_user_id ",
"type": "text",
"disabled": true
}
]
},
"url": {
"raw": "https://api.us.tink.com/api/v1/oauth/authorization-grant/delegate",
"protocol": "https",
"host": [
"api",
"us",
"tink",
"com"
],
"path": [
"api",
"v1",
"oauth",
"authorization-grant",
"delegate"
]
}
},
"response": []
},
{
"name": "2. Get Token to Retrieve Account Verification Report",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"pm.environment.set(\"access_token\", jsonData.access_token);"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "client_id",
"value": "{{client_id}}",
"description": "Client Id is the unique ID for your app",
"type": "text"
},
{
"key": "client_secret",
"value": "{{client_secret}}",
"description": "Client Secret is the unique secret for you client",
"type": "text"
},
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
},
{
"key": "scope",
"value": "account-verification-reports:read,accounts:read",
"type": "text"
}
]
},
"url": {
"raw": "https://api.us.tink.com/api/v1/oauth/token",
"protocol": "https",
"host": [
"api",
"us",
"tink",
"com"
],
"path": [
"api",
"v1",
"oauth",
"token"
]
}
},
"response": []
},
{
"name": "3. Get the Account Check report as JSON",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"type": "text"
}
],
"url": {
"raw": "https://api.us.tink.com/api/v1/account-verification-reports/{{report_id}}",
"protocol": "https",
"host": [
"api",
"us",
"tink",
"com"
],
"path": [
"api",
"v1",
"account-verification-reports",
"{{report_id}}"
]
}
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
],
"variable": [
{
"key": "client_id",
"value": "",
"disabled": true
},
{
"key": "client_secret",
"value": "",
"disabled": true
},
{
"key": "report_id",
"value": "",
"disabled": true
},
{
"key": "access_token",
"value": "eyJhbGciOiJFUzI1NiIsImtpZCI6IjRhY2RkYTJmLTkzM2MtNDAyOS04ZGM2LTljNDBkNzA1NmM5OSIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDM3ODQ5ODMsImlhdCI6MTcwMzc4MzE4MywiaXNzIjoidGluazovL2F1dGgiLCJqdGkiOiJkMjAwNDJlMC04MzRmLTQ4Y2QtODFkYS1iOTE3YzkyNmFjZmIiLCJzY29wZXMiOlsidXNlcjpjcmVhdGUiLCJhdXRob3JpemF0aW9uOmdyYW50Il0sInN1YiI6InRpbms6Ly9hdXRoL2NsaWVudC9hZTg5YzYzOGQ1MjQ0NGJmYmVhMDUwYTZjZDc3M2QyOSIsInRpbms6Ly9hcHAvaWQiOiJhZjgxYzMzMDBmZjM0MDE0YjIyY2E2OGVkMzJkYzMwMiIsInRpbms6Ly9hcHAvdmVyaWZpZWQiOiJ0cnVlIn0.R9kZ7TeS9Rsw4maaHCbuMDWsTsUDNHseKRbql8pcto3HPwm1j0ltgrF_efzx9mcu6P99nZKaaZqYiDtKGcVN2Q",
"disabled": true
},
{
"key": "external_user_id",
"value": "external_user_id",
"disabled": true
},
{
"key": "user_id",
"value": "user_id",
"disabled": true
}
]
}

0 comments on commit 2b4eb5c

Please sign in to comment.