{"_id":"561d4ed26386060d00e06011","user":"55fae9d4825d5f19001fa379","version":{"_id":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":32,"createdAt":"2015-09-17T16:31:06.800Z","releaseDate":"2015-09-17T16:31:06.800Z","categories":["55faeacbd0e22017005b8269","55faf550764f50210095078e","55faf5b5626c341700fd9e96","55faf8a7825d5f19001fa386","560052f91503430d007cc88f","560054f73aa0520d00da0b1a","56005aaf6932a00d00ba7c62","56005c273aa0520d00da0b3f","5601ae7681a9670d006d164d","5601ae926811d00d00ceb487","5601aeb064866b1900f4768d","5601aee850ee460d0002224c","5601afa02499c119000faf19","5601afd381a9670d006d1652","561d4c78281aec0d00eb27b6","561d588d8ca8b90d00210219","563a5f934cc3621900ac278c","5665c5763889610d0008a29e","566710a36819320d000c2e93","56ddf6df8a5ae10e008e3926","56e1c96b2506700e00de6e83","56e1ccc4e416450e00b9e48c","56e1ccdfe63f910e00e59870","56e1cd10bc46be0e002af26a","56e1cd21e416450e00b9e48e","56e3139a51857d0e008e77be","573b4f62ef164e2900a2b881","57c9d1335fd8ca0e006308ed","57e2bd9d1e7b7220000d7fa5","57f2b992ac30911900c7c2b6","58adb5c275df0f1b001ed59b","58c81b5c6dc7140f003c3c46"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"v1","version_clean":"1.0.0","version":"1"},"parentDoc":null,"project":"55faeacad0e22017005b8265","__v":9,"category":{"_id":"5601afd381a9670d006d1652","project":"55faeacad0e22017005b8265","version":"55faeacad0e22017005b8268","__v":11,"pages":["5602341e930fe1170074bd22","560235191ba3720d00a6b9a4","561d4dec57165b0d00aa5d94","561d4e369e8e1f0d00983286","561d4e669e8e1f0d00983288","561d4ed26386060d00e06011","561d4f3457165b0d00aa5d97","563108d8f1c0580d00fac6f1","5645082598da41190099f31a","5665cf36e93ae70d00b969f8","56abda994e8ba20d006a23f7"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-22T19:45:23.406Z","from_sync":false,"order":2,"slug":"authentication-guide","title":"Authentication Guide"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-13T18:34:58.774Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"By the end of this lesson, you'll be able to send your OAuth2 access token in a header to make an API call.\"\n}\n[/block]\nAny request to a GBDX API must include a valid OAUth2 token (also called Bearer Token). \n\nTo learn how to get a Token, watch this video lesson, [Video: How to Get an Oauth2 Token](doc:lesson-1-get-an-oauth2-token), or use the Token request under Auth in the GBDX [Postman Collection](doc:postman-collection-1).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Add the Bearer Token to the Request\"\n}\n[/block]\nIf you're using Postman to make the API call, you can either add the Token to your environment variables, or select Headers and replace \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/5XNgbIOSkuxmOacFbFqg_header.jpg\",\n        \"header.jpg\",\n        \"716\",\n        \"247\",\n        \"#91434a\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nWhen adding your token in Postman, be sure to remove the double parenthesis and their contents, then add the token.","excerpt":"How to use your OAuth2 Token to access APIs on DigitalGlobe's GBDX platform","slug":"lesson-2-use-your-token","type":"basic","title":"Lesson: Use your OAuth2 Token"}

Lesson: Use your OAuth2 Token

How to use your OAuth2 Token to access APIs on DigitalGlobe's GBDX platform

[block:callout] { "type": "info", "title": "By the end of this lesson, you'll be able to send your OAuth2 access token in a header to make an API call." } [/block] Any request to a GBDX API must include a valid OAUth2 token (also called Bearer Token). To learn how to get a Token, watch this video lesson, [Video: How to Get an Oauth2 Token](doc:lesson-1-get-an-oauth2-token), or use the Token request under Auth in the GBDX [Postman Collection](doc:postman-collection-1). [block:api-header] { "type": "basic", "title": "1. Add the Bearer Token to the Request" } [/block] If you're using Postman to make the API call, you can either add the Token to your environment variables, or select Headers and replace [block:image] { "images": [ { "image": [ "https://files.readme.io/5XNgbIOSkuxmOacFbFqg_header.jpg", "header.jpg", "716", "247", "#91434a", "" ] } ] } [/block] When adding your token in Postman, be sure to remove the double parenthesis and their contents, then add the token.