> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.gomoney.me/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.gomoney.me/_mcp/server.

# Login na API PIX

POST https://gmc-api.gomoney.me/api/auth/login
Content-Type: application/json

Autentica o usuário integrador na API PIX e retorna o token `Bearer`
usado nos endpoints protegidos das APIs documentadas.

O login deve ser feito com o `email` e a `senha` de um acesso criado
na plataforma como `INTEGRATION` e mantido com `INTEGRATION_ONLY`.


Reference: https://docs.gomoney.me/api-reference/open-api-explorer/authentication/pix-login

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: gomoney-docs-postman-collection
  version: 1.0.0
paths:
  /auth/login:
    post:
      operationId: pix-login
      summary: Login na API PIX
      description: |
        Autentica o usuário integrador na API PIX e retorna o token `Bearer`
        usado nos endpoints protegidos das APIs documentadas.

        O login deve ser feito com o `email` e a `senha` de um acesso criado
        na plataforma como `INTEGRATION` e mantido com `INTEGRATION_ONLY`.
      tags:
        - authentication
      responses:
        '201':
          description: Login realizado com sucesso.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthSuccessResponse'
        '401':
          description: Credenciais inválidas.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '429':
          description: Usuário bloqueado temporariamente por excesso de tentativas.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixRateLimitError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PixLoginRequest'
servers:
  - url: https://gmc-api.gomoney.me/api
    description: Base URL da API da plataforma
  - url: https://api-pix.gomoney.me
    description: Base URL da API PIX
components:
  schemas:
    PixLoginRequest:
      type: object
      properties:
        email:
          type: string
          format: email
        password:
          type: string
      required:
        - email
        - password
      title: PixLoginRequest
    AuthSuccessResponse:
      type: object
      properties:
        token:
          type: string
        title:
          type: string
        expiresIn:
          type: integer
          format: int64
        userId:
          type: string
      required:
        - token
        - title
        - expiresIn
        - userId
      title: AuthSuccessResponse
    UnauthorizedError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
      title: UnauthorizedError
    PixRateLimitError:
      type: object
      properties:
        statusCode:
          type: integer
        path:
          type: string
        code:
          type: string
        message:
          type: string
      title: PixRateLimitError

```

## Examples

### success



**Request**

```json
undefined
```

**Response**

```json
{
  "token": "pix-jwt-token",
  "title": "Successfull login.",
  "expiresIn": 1783191600000,
  "userId": "66f0b1b5c1f7b7dc0ce20001"
}
```

**SDK Code**

```python success
import requests

url = "https://gmc-api.gomoney.me/api/auth/login"

headers = {"Content-Type": "application/json"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript success
const url = 'https://gmc-api.gomoney.me/api/auth/login';
const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: undefined};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go success
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://gmc-api.gomoney.me/api/auth/login"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby success
require 'uri'
require 'net/http'

url = URI("https://gmc-api.gomoney.me/api/auth/login")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://gmc-api.gomoney.me/api/auth/login")
  .header("Content-Type", "application/json")
  .asString();
```

```php success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://gmc-api.gomoney.me/api/auth/login', [
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp success
using RestSharp;

var client = new RestClient("https://gmc-api.gomoney.me/api/auth/login");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift success
import Foundation

let headers = ["Content-Type": "application/json"]

let request = NSMutableURLRequest(url: NSURL(string: "https://gmc-api.gomoney.me/api/auth/login")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### default



**Request**

```json
{
  "email": "your-user@example.com",
  "password": "your-user-password"
}
```

**Response**

```json
{
  "token": "pix-jwt-token",
  "title": "Successfull login.",
  "expiresIn": 1783191600000,
  "userId": "66f0b1b5c1f7b7dc0ce20001"
}
```

**SDK Code**

```python default
import requests

url = "https://gmc-api.gomoney.me/api/auth/login"

payload = {
    "email": "your-user@example.com",
    "password": "your-user-password"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript default
const url = 'https://gmc-api.gomoney.me/api/auth/login';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"email":"your-user@example.com","password":"your-user-password"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go default
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://gmc-api.gomoney.me/api/auth/login"

	payload := strings.NewReader("{\n  \"email\": \"your-user@example.com\",\n  \"password\": \"your-user-password\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby default
require 'uri'
require 'net/http'

url = URI("https://gmc-api.gomoney.me/api/auth/login")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"email\": \"your-user@example.com\",\n  \"password\": \"your-user-password\"\n}"

response = http.request(request)
puts response.read_body
```

```java default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://gmc-api.gomoney.me/api/auth/login")
  .header("Content-Type", "application/json")
  .body("{\n  \"email\": \"your-user@example.com\",\n  \"password\": \"your-user-password\"\n}")
  .asString();
```

```php default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://gmc-api.gomoney.me/api/auth/login', [
  'body' => '{
  "email": "your-user@example.com",
  "password": "your-user-password"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp default
using RestSharp;

var client = new RestClient("https://gmc-api.gomoney.me/api/auth/login");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"email\": \"your-user@example.com\",\n  \"password\": \"your-user-password\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift default
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "email": "your-user@example.com",
  "password": "your-user-password"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://gmc-api.gomoney.me/api/auth/login")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```