Defined the POST /oauth/access_token endpoints on the OpenAPI specification document in the library target.

This commit is contained in:
2025-10-13 19:43:05 +02:00
parent 8cf19e02c8
commit 4511a6e49c
+30
View File
@@ -303,6 +303,36 @@ paths:
$ref: '#/components/headers/OAuthCallback'
'500':
$ref: '#/components/responses/InternalError'
/oauth/access_token:
post:
tags:
- Authentication
summary: Provide required credentials data to obtain an access token.
description: |
Provide to the service some required credentials details to obtain an access token at the end of the *OAuth* process.
This endpoint represents the [4th step of the OAuth flow process](https://www.discogs.com/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url), thus it requires to configure an *Authorization* header to have a value like this:
```
OAuth oauth_consumer_key="your_consumer_key", oauth_nonce="random_string_or_timestamp", oauth_token="oauth_token_received_from_step_2" oauth_signature="your_consumer_secret&", oauth_signature_method="PLAINTEXT", oauth_timestamp="current_timestamp", oauth_verifier="users_verifier"
```
For further details about this process, please refer to the [OAuth flow](https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow) section in the [Discogs API authentication](https://www.discogs.com/developers#page:authentication) documentation.
operationId: postAccessToken
parameters:
- $ref: '#/components/parameters/ContentType'
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/UserAgent'
responses:
'200':
description: Successfully retrieved an access token at the end of the OAuth authentication process.
headers:
oauth_token:
$ref: '#/components/headers/OAuthToken'
oauth_token_secret:
$ref: '#/components/headers/OAuthSecret'
'500':
$ref: '#/components/responses/InternalError'
/artists/{artist_id}:
get:
tags: