{"_id":"5771b7c045c7080e007292a7","__v":11,"editedParams":true,"editedParams2":true,"category":{"_id":"5771b5d8c755ca0e00617d7d","project":"568af724176a6c0d00a29ec4","__v":0,"version":"568af725176a6c0d00a29ec7","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-06-27T23:25:12.392Z","from_sync":false,"order":0,"slug":"account","title":"Account"},"parentDoc":null,"project":"568af724176a6c0d00a29ec4","user":"568af6d197d8960d0012ab7d","version":{"_id":"568af725176a6c0d00a29ec7","project":"568af724176a6c0d00a29ec4","__v":11,"createdAt":"2016-01-04T22:50:13.289Z","releaseDate":"2016-01-04T22:50:13.289Z","categories":["568af725176a6c0d00a29ec8","56d9d397337fd11300d6a3e3","56d9d4287222d50b0070160b","56f424307ea0091700f63ac5","56f45babcb0dce29005a8e85","5739e5836c5ba134007a197d","57717aee3dd24019004c9122","5771b5d8c755ca0e00617d7d","579639964913990e001a5911","57e57e7df3d7fc0e009c5119","587569b6f4483a0f00d2e6b8"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["57776742e5682f0e00d51184","58ac2529d5e1570f00d1c118","597b4c0e7bdbc500385969f2","5a3759b524fdd8001c46d237"],"next":{"pages":[],"description":""},"createdAt":"2016-06-27T23:33:20.278Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"name":"","code":"\n{\n    \"account\":{\n        \"id\":1234567,\n        \"firstName\":\"John\",\n        \"lastName\":\"Doe\",\n        \"joinDate\":\"2016-01-01 08:00:00\",\n        \"referral\":{\n            \"count\":0,\n            \"revenue\":0\n        }\n    },\n    \"campaigns\":[\n        {\n            \"campaignId\":9876543,\n            \"apiKey\":\"098f6bcd4621d373cade4e832627b4f6\",\n            \"name\":\"JohnDoeBlog.com\",\n            \"approvalStatus\":\"Approved\",\n            \"category\":\"Sports & Fitness\",\n            \"platform\":\"WordPress\",\n            \"applicationType\":\"Blog\"\n        }\n    ]\n}\n","language":"json"},{"language":"json","status":401,"name":"","code":"{\n    \"error\": {\n        \"errors\": [\n            {\n                \"reason\": \"invalidCredentials\",\n                \"message\": \"Authorization secret is missing or invalid. This can be found at https://publishers.viglink.com/account and can be sent as a parameter or Authorization header\",\n                \"locationType\": \"parameter\",\n                \"location\": \"secret\"\n            }\n        ]\n    },\n    \"code\": 401,\n    \"message\": \"Authorization secret is missing or invalid. This can be found at https://publishers.viglink.com/account and can be sent as a parameter or Authorization header\"\n}"},{"code":"{\n    \"error\": {\n        \"errors\": [\n            {\n                \"reason\": \"internalServerError\",\n                \"message\": \"An unexpected error occurred, but we are looking into it\"\n            }\n        ]\n    },\n    \"code\": 500,\n    \"message\": \"An unexpected error occurred, but we are looking into it\"\n}","language":"json","status":500}]},"settings":"57717d5327a5c20e00030dbd","examples":{"codes":[{"language":"php","code":"<?php\n$ch = curl_init(\"https://rest.viglink.com/api/account\");\n\ncurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: secret YOUR SECRET KEY'));\n\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($ch);\n\ncurl_close($ch);"},{"code":"require 'httparty'\n\nurl = \"https://rest.viglink.com/api/account\"\n\nheaders = {Authorization: \"secret {SECRET KEY}\"}\n\nresponse = HTTParty.get(url, headers: headers)","language":"ruby"},{"code":"curl -i -X GET -H \"Authorization: secret {SECRET KEY}\" 'https://rest.viglink.com/api/account'","language":"curl"}]},"method":"get","auth":"required","params":[{"_id":"57842adcb3a5402400fee891","ref":"","in":"query","required":false,"desc":"By default, a list of your campaigns is returned. To return just your account data, send false","default":"TRUE","type":"boolean","name":"includeCampaigns"},{"_id":"57842adcb3a5402400fee890","ref":"","in":"query","required":false,"desc":"Lowercase format of response: json or xml","default":"json","type":"string","name":"format"},{"_id":"57842adcb3a5402400fee88f","ref":"","in":"query","required":false,"desc":"JSON-P callback method name","default":"NULL","type":"string","name":"callback"}],"url":"/account"},"isReference":false,"order":0,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Authorization Header\",\n  \"body\": \"You must add authorization headers to this request.\\n```Authorization: secret {SECRET KEY}```\\n\\n<b>Replace {SECRET KEY} above with any secret key from any campaign in your account.</b> You can find a secret key in your [VigLink account](https://publishers.viglink.com/account). When logged into your dashboard, go to Manage > Account. Under the My Campaign sub-heading, copy a Secret Key. If you don’t have one, click “Get a Secret Key\\\" on any of your campaigns.\"\n}\n[/block]\nUse this endpoint to get your account information including accountId and each campaignId that can be used for other endpoints.","excerpt":"Get your account information and campaign details.","slug":"account-info","type":"endpoint","title":"Account Info"}

getAccount Info

Get your account information and campaign details.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

includeCampaigns:
booleanTRUE
By default, a list of your campaigns is returned. To return just your account data, send false
format:
stringjson
Lowercase format of response: json or xml
callback:
stringNULL
JSON-P callback method name

Examples


Result Format


Documentation

[block:callout] { "type": "warning", "title": "Authorization Header", "body": "You must add authorization headers to this request.\n```Authorization: secret {SECRET KEY}```\n\n<b>Replace {SECRET KEY} above with any secret key from any campaign in your account.</b> You can find a secret key in your [VigLink account](https://publishers.viglink.com/account). When logged into your dashboard, go to Manage > Account. Under the My Campaign sub-heading, copy a Secret Key. If you don’t have one, click “Get a Secret Key\" on any of your campaigns." } [/block] Use this endpoint to get your account information including accountId and each campaignId that can be used for other endpoints.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}