---
# System prepended metadata

title: Untitled

---

## Common Error Encounter:
<details>
<summary style="font-size:1.25em; font-weight: 600">
1. 401 0r 403 Forbidden Error:
</summary>
    Reason for this error: Account got locked because of two factor Auth which simulators can't do:
    
>     *If you facing 401 issue then:*
    
Step 1. Try running on differnt simulator and if it still not work then.
Step 2. Create different twitter account and login through new account.
Step 3. Follow the link for the detailed modification: (https://developer.twitter.com/en/support/labs/error-troubleshooting) 
>     *If you facing 403 issue then:*
    
Step 1. Check where you are trying to retrieve or post
Step 2. Doing a http vs https request or may be calling the api wrong.
Step 3. Account locked follow the above mention steps for error 401 to proceed. 


<details>
<summary style="font-size:1.25em; font-weight: 600">
2. Enable 3 legged OAuth: 
</summary>
Step 1. If using modern api : enable oAuth 1.0 and 2.0
    
Step 2. If no modern api then follow the below steps:
* Step 2.1. Once you responded to why you using API and basic questions. 
* Step 2.2. Get to the projects & apps dashboard. create a new standard project.
* Step 2.3. Copy the generated consumer key & consumer secret key and replace it respectively in the client constant under the TwitterAPICaller.swift file.
* Step 2.4 On your app settings on the twitter dashboard, scroll down to authentication settings. edit & enable 3-legged oauth and put alamoTwitter:// under the callback urls & save.


