Files
discogs-service/docs/data/documentation/discogsservice/apiprotocol/postaccesstoken(headers:).json
T

1 line
22 KiB
JSON
Raw Normal View History

2025-10-16 17:33:15 +00:00
{"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"kind":"text","text":"."},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct","kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"content":[{"anchor":"discussion","type":"heading","text":"Discussion","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Provide to the service some required credentials details to obtain an access token at the end of the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"OAuth"}]},{"type":"text","text":" process."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This endpoint represents the "},{"type":"reference","identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","isActive":true},{"type":"text","text":", thus it requires to configure an "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Authorization"}]},{"type":"text","text":" header to have a value like this:"}]},{"type":"codeListing","syntax":null,"code":["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\""]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For further details about this process, please refer to the "},{"type":"reference","identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","isActive":true},{"type":"text","text":" section in the "},{"type":"reference","identifier":"https:\/\/www.discogs.com\/developers#page:authentication","isActive":true},{"type":"text","text":" documentation."}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"code":"POST \/oauth\/access_token","type":"codeVoice"},{"type":"text","text":"."}]}],"type":"aside","name":"Remark","style":"note"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"code":"#\/paths\/\/oauth\/access_token\/post(postAccess