> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Login with Twitter

> ### Changelog
| Version      | Description | 
 | ---------------- | ------------|
 |1.0.0            | Added `avatarUrl` property to response       |
 |0.64.0            | Added `me` property.      |
 |0.63.0            | Added      |

## OpenAPI

````json POST /api/v1/login - with Twitter
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Authentication"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "tags": [
    {
      "name": "Authentication"
    },
    {
      "name": "Two-Factor Authentication"
    }
  ],
  "paths": {
    "/api/v1/login - with Twitter": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Login with Twitter",
        "description": "### Changelog\n| Version      | Description | \n | ---------------- | ------------|\n |1.0.0            | Added `avatarUrl` property to response       |\n |0.64.0            | Added `me` property.      |\n |0.63.0            | Added      |",
        "operationId": "post-api-v1-login-twitter",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serviceName": {
                    "type": "string",
                    "description": "The desired OAuth service name. In this case, `twitter`.",
                    "example": "twitter"
                  },
                  "accessToken": {
                    "type": "string",
                    "description": "Access token provided by Twitter OAuth.",
                    "example": "hash"
                  },
                  "accessTokenSecret": {
                    "type": "string",
                    "description": "The access token secret provided by Twitter OAuth.",
                    "example": "hash"
                  },
                  "appSecret": {
                    "type": "string",
                    "description": "The app secret provided by Twitter.",
                    "example": "hash"
                  },
                  "appId": {
                    "type": "string",
                    "description": "The app ID provided by Twitter.",
                    "example": "hash"
                  },
                  "expiresIn": {
                    "type": "integer",
                    "description": "Lifetime of token (in seconds).",
                    "example": "200"
                  }
                },
                "required": [
                  "serviceName",
                  "accessToken",
                  "accessTokenSecret",
                  "appSecret",
                  "appId",
                  "expiresIn"
                ],
                "x-examples": {
                  "Example": {
                    "serviceName": "twitter",
                    "accessToken": "hash",
                    "accessTokenSecret": "hash",
                    "appSecret": "hash",
                    "appId": "hash",
                    "expiresIn": "200"
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "serviceName": "twitter",
                    "accessToken": "hash",
                    "accessTokenSecret": "hash",
                    "appSecret": "hash",
                    "appId": "hash",
                    "expiresIn": "200"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "authToken": {
                          "type": "string"
                        },
                        "userId": {
                          "type": "string"
                        },
                        "me": {
                          "type": "object",
                          "properties": {
                            "_id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "emails": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "address": {
                                    "type": "string"
                                  },
                                  "verified": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "status": {
                              "type": "string"
                            },
                            "statusConnection": {
                              "type": "string"
                            },
                            "username": {
                              "type": "string"
                            },
                            "utcOffset": {
                              "type": "integer"
                            },
                            "active": {
                              "type": "boolean"
                            },
                            "roles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "settings": {
                              "type": "object",
                              "properties": {
                                "preferences": {
                                  "type": "object"
                                }
                              }
                            },
                            "avatarUrl": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "x-examples": {
                    "Example": {
                      "status": "success",
                      "data": {
                        "authToken": "9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq",
                        "userId": "aobEdbYhXfu5hkeqG",
                        "me": {
                          "_id": "aYjNnig8BEAWeQzMh",
                          "name": "Rocket Cat",
                          "emails": [
                            {
                              "address": "rocket.cat@rocket.chat",
                              "verified": "false"
                            }
                          ],
                          "status": "offline",
                          "statusConnection": "offline",
                          "username": "rocket.cat",
                          "utcOffset": "-3",
                          "active": "true",
                          "roles": [
                            "admin"
                          ],
                          "settings": {
                            "preferences": {}
                          },
                          "avatarUrl": "http://localhost:3000/avatar/test"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success Example": {
                    "value": {
                      "status": "success",
                      "data": {
                        "authToken": "9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq",
                        "userId": "aobEdbYhXfu5hkeqG",
                        "me": {
                          "_id": "aYjNnig8BEAWeQzMh",
                          "name": "Rocket Cat",
                          "emails": [
                            {
                              "address": "rocket.cat@rocket.chat",
                              "verified": "false"
                            }
                          ],
                          "status": "offline",
                          "statusConnection": "offline",
                          "username": "rocket.cat",
                          "utcOffset": "-3",
                          "active": "true",
                          "roles": [
                            "admin"
                          ],
                          "settings": {
                            "preferences": {}
                          },
                          "avatarUrl": "http://localhost:3000/avatar/test"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
````

