[GH-ISSUE #648] RequestError for renewAccessToken #424

Closed
opened 2026-03-03 16:48:34 +03:00 by kerem · 1 comment
Owner

Originally created by @pandapancake on GitHub (Mar 19, 2021).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/648

Description:

I'm not sure what to put in the parameters, header . Read a lot of different questions but still can't figure it out or any good example. Thank you!

if tokenExpire == true {
  auth = OAuth2Swift(consumerKey: **********,
                                     consumerSecret: ***********,
                                     authorizeUrl: "",
                                     accessTokenUrl: tokenURL,
                                     responseType: "")
   auth?.renewAccessToken(withRefreshToken: oauth.oauthRefreshToken,  parameters: nil, headers: nil, completionHandler: { response in
      //do something...
    })
}

OAuth Version:

  • Version 2

OS (Please fill the version) :

  • iOS :

Installation method:

  • CocoaPods

Library version:

  • head

Xcode version:

  • 11.4 (Swift 5.2)
Originally created by @pandapancake on GitHub (Mar 19, 2021). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/648 ### Description: I'm not sure what to put in the parameters, header . Read a lot of different questions but still can't figure it out or any good example. Thank you! ``` if tokenExpire == true { auth = OAuth2Swift(consumerKey: **********, consumerSecret: ***********, authorizeUrl: "", accessTokenUrl: tokenURL, responseType: "") auth?.renewAccessToken(withRefreshToken: oauth.oauthRefreshToken, parameters: nil, headers: nil, completionHandler: { response in //do something... }) } ``` ### OAuth Version: - [x] Version 2 ### OS (Please fill the version) : - [x] iOS : ### Installation method: - [x] CocoaPods ### Library version: - [x] head ### Xcode version: - [x] 11.4 (Swift 5.2)
kerem closed this issue 2026-03-03 16:48:34 +03:00
Author
Owner

@phimage commented on GitHub (Apr 29, 2021):

nothing, add only if you know and need it, there is default value to nil already set headers: OAuthSwift.Headers? = nil,

<!-- gh-comment-id:829521702 --> @phimage commented on GitHub (Apr 29, 2021): nothing, add only if you know and need it, there is default value to nil already set `headers: OAuthSwift.Headers? = nil,`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#424
No description provided.