Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Latest commit

 

History

History
58 lines (38 loc) · 1.67 KB

OauthApi.md

File metadata and controls

58 lines (38 loc) · 1.67 KB

BlackboardRest\OauthApi

All URIs are relative to https://localhost/learn/api/public/v1/

Method HTTP request Description
oauth2TokenPost POST oauth2/token Request Token

oauth2TokenPost

\BlackboardRest\Model\OAuth2AccessToken oauth2TokenPost($grant_type)

Request Token

Requests an OAuth 2 access token. Since: 2015.11.0

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basic
BlackboardRest\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
BlackboardRest\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new BlackboardRest\Api\OauthApi();
$grant_type = "grant_type_example"; // string | Must be 'client_credentials'.

try {
    $result = $api_instance->oauth2TokenPost($grant_type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OauthApi->oauth2TokenPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
grant_type string Must be 'client_credentials'.

Return type

\BlackboardRest\Model\OAuth2AccessToken

Authorization

basic

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]