Authentication
Use access token
1 min
once you have successfully authenticated and recieved an access token you can make secure requests to the fcc api when calling the fcc api, every authenticated request must include an authorization header set to bearer access token this means your application first retrieves an oauth2 access token using the client credentials flow, and then supplies that token in the header of each api call the word “bearer” indicates the type of token, and the {access token} portion is the actual credential returned by the previous step any request missing this header—or containing an expired or invalid token—will be rejected by the api the fcc api provides an endpoint to test that authentication is working { "name" "ping", "method" "get", "url" "https //api fccfinance dev/servicing/ping", "description" "used to test authentication", "tab" "examples", "examples" { "languages" \[ { "id" "1uhqv a1g ljummbixbcv", "language" "javascript", "code" "const requestoptions = {\n method \\"get\\",\n redirect \\"follow\\"\n};\n\nfetch(\\"https //api fccfinance dev/servicing/ping\\", requestoptions)\n then((response) => response text())\n then((result) => console log(result))\n catch((error) => console error(error));", "customlabel" "" } ], "selectedlanguageid" "1uhqv a1g ljummbixbcv" }, "results" { "languages" \[ { "id" "s 8ji4doqwkcsb8f8ldai", "language" "200", "code" "pong", "customlabel" "" }, { "id" "glfohlaulozcb4cskpljb", "language" "401", "code" "", "customlabel" "" } ], "selectedlanguageid" "s 8ji4doqwkcsb8f8ldai" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "autogeneratedanchorslug" "ping", "legacyhash" "9oomohlgb4drrnkhmpp3m" }