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

1 line
22 KiB
JSON
Raw Normal View History

{"kind":"symbol","sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(headers:)"},"abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"seeAlsoSections":[{"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(headers:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(headers:)"],"title":"Authentication endpoints","generated":true,"anchor":"Authentication-endpoints"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"postAccessToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"text":".","kind":"text"},{"text":"PostAccessToken","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"text":".","kind":"text"},{"text":"PostAccessToken","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output"}]}],"kind":"declarations"},{"content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"inlineContent":[{"text":"Provide to the service some required credentials details to obtain an access token at the end of the ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"OAuth"}]},{"text":" process.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"This endpoint represents the ","type":"text"},{"type":"reference","isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url"},{"text":", thus it requires to configure an ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"Authorization"}]},{"text":" header to have a value like this:","type":"text"}],"type":"paragraph"},{"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\