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

1 line
14 KiB
JSON
Raw Normal View History

{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getRequestToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"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\/GetRequestToken","kind":"typeIdentifier","text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken\/Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV7HeadersV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken\/Input\/Headers-swift.struct"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","text":"Operations"},{"text":".","kind":"text"},{"text":"GetRequestToken","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO"},{"text":".","kind":"text"},{"text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken\/Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO"}]}]},{"content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"type":"paragraph","inlineContent":[{"text":"Retrieve a request token to initialize an ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"OAuth","type":"text"}]},{"text":" authentication process.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This endpoint represents the "},{"isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#header-2.-send-a-get-request-to-the-discogs-request-token-url","type":"reference"},{"text":", thus it requires to configure an ","type":"text"},{"inlineContent":[{"type":"text","text":"Authorization"}],"type":"emphasis"},{"text":" header to have a value like this:","type":"text"}]},{"type":"codeListing","code":["OAuth oauth_consumer_key=\"your_consumer_key\", oauth_nonce=\"random_string_or_timestamp\", oauth_signature=\"your_consumer_secret&\", oauth_signature_method=\"PLAINTEXT\", oauth_timestamp=\"current_timestamp\", oauth_callback=\"your_callback\""],"syntax":null},{"type":"paragraph","inlineContent":[{"text":"For further details about this process, please refer to the ","type":"text"},{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","isActive":true,"type":"reference"},{"text":" section in the ","type":"text"},{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","isActive":true,"type":"reference"},{"text":" documentation.","type":"text"}]},{"type":"aside","content":[{"inlineContent":[{"text":"HTTP ","type":"text"},{"code":"GET \/oauth\/request_token","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}],"style":"note","name":"Remark"},{"type":"aside","content":[{"inlineContent":[{"text":"Generated from ","type":"text"},{"code":"#\/paths\/\/oauth\/request_token\/get(getRequestToken)","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}],"style":"note","name"