oauth2_authorization_codes_retrieve
GET/api/v3//oauth2/authorization_codes/:id/
AuthorizationCode Viewset
Request
Path Parameters
id integerrequired
A unique integer value identifying this Authorization Code.
Responses
- 200
- 400
- 403
- application/json
- Schema
- Example (auto)
Schema
pkID (integer)required
provider objectrequired
user objectrequired
is_expiredbooleanrequired
Check if token is expired yet.
expiresdate-timenullable
scopestring[]required
{
"pk": 0,
"provider": {
"pk": 0,
"name": "string",
"authentication_flow": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"authorization_flow": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invalidation_flow": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"property_mappings": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"component": "string",
"assigned_application_slug": "string",
"assigned_application_name": "string",
"assigned_backchannel_application_slug": "string",
"assigned_backchannel_application_name": "string",
"verbose_name": "string",
"verbose_name_plural": "string",
"meta_model_name": "string",
"client_type": "confidential",
"client_id": "string",
"client_secret": "string",
"access_code_validity": "string",
"access_token_validity": "string",
"refresh_token_validity": "string",
"include_claims_in_id_token": true,
"signing_key": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"encryption_key": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"redirect_uris": [
{
"matching_mode": "strict",
"url": "string"
}
],
"sub_mode": "hashed_user_id",
"issuer_mode": "global",
"jwt_federation_sources": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"jwt_federation_providers": [
0
]
},
"user": {
"pk": 0,
"username": "string",
"name": "string",
"is_active": true,
"last_login": "2024-07-29T15:51:28.071Z",
"is_superuser": true,
"groups": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"groups_obj": [
{
"pk": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"num_pk": 0,
"name": "string",
"is_superuser": true,
"parent": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"parent_name": "string",
"attributes": {}
}
],
"email": "user@example.com",
"avatar": "string",
"attributes": {},
"uid": "string",
"path": "string",
"type": "internal",
"uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"password_change_date": "2024-07-29T15:51:28.071Z"
},
"is_expired": true,
"expires": "2024-07-29T15:51:28.071Z",
"scope": [
"string"
]
}
- application/json
- Schema
- Example (auto)
Schema
non_field_errorsstring[]
codestring
property name*any
Validation Error
{
"non_field_errors": [
"string"
],
"code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
detailstringrequired
codestring
{
"detail": "string",
"code": "string"
}
Authorization: http
name: authentiktype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "/api/v3/oauth2/authorization_codes/:id/");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());