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

1 line
21 KiB
JSON
Raw Normal View History

{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(headers:)"},"seeAlsoSections":[{"generated":true,"anchor":"Authentication-endpoints","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(headers:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(headers:)"],"title":"Authentication endpoints"}],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol"]]},"variants":[{"paths":["\/documentation\/discogsservice\/apiprotocol\/getrequesttoken(headers:)"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"getRequestToken","kind":"identifier"},{"kind":"text","text":"("},{"text":"headers","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Operations","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken","kind":"typeIdentifier","text":"GetRequestToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV","text":"Input"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV7HeadersV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken\/Input\/Headers-swift.struct","kind":"typeIdentifier","text":"Headers"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","text":"GetRequestToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken\/Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO","text":"Output"}],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"inlineContent":[{"type":"text","text":"Retrieve a request token to initialize an "},{"type":"emphasis","inlineContent":[{"text":"OAuth","type":"text"}]},{"type":"text","text":" authentication process."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"This endpoint represents the "},{"type":"reference","isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#header-2.-send-a-get-request-to-the-discogs-request-token-url"},{"type":"text","text":", thus it requires to configure an "},{"type":"emphasis","inlineContent":[{"text":"Authorization","type":"text"}]},{"type":"text","text":" header to have a value like this:"}],"type":"paragraph"},{"syntax":null,"type":"codeListing","code":["OAuth oauth_consumer_key=\"your_consumer_key\", oauth_nonce=\"random_string_or_timestamp\", oauth_signature=\"your_consumer_secret&\", oauth