declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
$sdk = Polar\Polar::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->oauth2->authorize(
);
if ($response->responseOauth2Authorize !== null) {
// handle response
}
{
"client": {
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"client_id": "<string>",
"client_name": "<string>",
"client_uri": "<string>",
"logo_uri": "<string>",
"tos_uri": "<string>",
"policy_uri": "<string>"
},
"sub_type": "<string>",
"sub": {
"id": "<string>",
"email": "jsmith@example.com",
"avatar_url": "<string>"
},
"scopes": [
"openid"
]
}
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
$sdk = Polar\Polar::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->oauth2->authorize(
);
if ($response->responseOauth2Authorize !== null) {
// handle response
}
{
"client": {
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"client_id": "<string>",
"client_name": "<string>",
"client_uri": "<string>",
"logo_uri": "<string>",
"tos_uri": "<string>",
"policy_uri": "<string>"
},
"sub_type": "<string>",
"sub": {
"id": "<string>",
"email": "jsmith@example.com",
"avatar_url": "<string>"
},
"scopes": [
"openid"
]
}
You can generate an Organization Access Token from your organization's settings.
Successful Response
The response is of type object
.
Was this page helpful?