<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Social",
  "identifier" : "/documentation/Social/SLRequest/preparedURLRequest()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Social"
    ],
    "preciseIdentifier" : "c:objc(cs)SLRequest(im)preparedURLRequest"
  },
  "title" : "preparedURLRequest()"
}
-->

# preparedURLRequest()

Returns an authorized URL request that can be sent using an <doc://com.apple.documentation/documentation/Foundation/NSURLConnection> object.

```
func preparedURLRequest() -> URLRequest!
```

## Return Value

An OAuth-compatible `NSURLRequest` object that allows an app to act on behalf of the user, while keeping the user’s password private. The `NSURLRequest` is signed as OAuth1 by default, or OAuth2 by adding the appropriate token based on the user’s account.

## Discussion

Use this method to modify your request before sending. By setting the account correctly, this method will automatically add any necessary tokens.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)