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

# List Authorizations for all countries

This call returns the restrictions of all countries.

### Responses

<AccordionGroup>
  <Accordion title="200">
    <ResponseField name="Array (Authorizations)" type="array">
      The list of countries and their restrictions.

      <Expandable title="properties">
        <ResponseField name="Object (Country Authorization)" type="object">
          The country authorization object indicating if there are restrictions for a given country.

          <Expandable title="properties">
            <ResponseField name="CountryCode" type="string">
              Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))

              The code of the country.
            </ResponseField>

            <ResponseField name="CountryName" type="string">
              Name of the country.
            </ResponseField>

            <ResponseField name="Authorization" type="object">
              Information about the country’s restrictions.

              <Expandable title="properties" defaultOpen>
                <ResponseField name="BlockUserCreation" type="boolean">
                  Whether or not user creation is possible based on the user’s country of residence, address, and nationality.
                </ResponseField>

                <ResponseField name="BlockBankAccountCreation" type="boolean">
                  Whether or not bank account creation is possible based on the bank’s country of domiciliation.
                </ResponseField>

                <ResponseField name="BlockPayout" type="boolean">
                  Whether or not payout creation is possible based on the bank’s country of domiciliation.
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="LastUpdate" type="Unix timestamp">
              The date and time when at least one of the country's authorizations has been last updated.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json 200 theme={null}
  [
      {
          "CountryCode":"FI",
          "CountryName":"Finland",
          "Authorization":{
              "BlockUserCreation":false,
              "BlockBankAccountCreation":false,
              "BlockPayout":false
          },
          "LastUpdate":1644574249
      },
      {
          "CountryCode":"FR",
          "CountryName":"France",
          "Authorization":{
              "BlockUserCreation":false,
              "BlockBankAccountCreation":false,
              "BlockPayout":false
          },
          "LastUpdate":1644574249
      }
  ]  

  ```
</ResponseExample>

<RequestExample>
  ```javascript NodeJS   theme={null}
  const mangopayInstance = require('mangopay4-nodejs-sdk')
  const mangopay = new mangopayInstance({
    clientId: 'your-client-id',
    clientApiKey: 'your-api-key',
  })

  const listCountryAuthorizations = async () => {
    return await mangopay.Regulatory.getAllCountriesAuthorizations()
      .then((response) => {
        console.info(response)
        return response
      })
      .catch((err) => {
        console.log(err)
        return false
      })
  }

  listCountryAuthorizations()  
  ```

  ```ruby Ruby   theme={null}
  require 'mangopay'

  MangoPay.configure do |client|
      client.preproduction = true
      client.client_id = 'your-client-id'
      client.client_apiKey = 'your-api-key'
      client.log_file = File.join(Dir.pwd, 'mangopay.log')
  end

  def listCountryAuthorization()
      begin
          response = MangoPay::Regulatory.get_all_countries_authorizations()
          puts response
          return response
      rescue MangoPay::ResponseError => error
          puts "Failed to fetch country authorizations: #{error.message}"
          puts "Error details: #{error.details}"
          return false
      end
  end

  listCountryAuthorization()  
  ```

  ```java Java  theme={null}
  import java.util.List;
  import com.google.gson.Gson;
  import com.google.gson.GsonBuilder;
  import com.mangopay.MangoPayApi;
  import com.mangopay.core.Pagination;
  import com.mangopay.entities.CountryAuthorization;

  public class ListCountryAuthorizations {
       public static void main(String[] args) throws Exception {
          MangoPayApi mangopay = new MangoPayApi();
          mangopay.getConfig().setClientId("your-client-id");
          mangopay.getConfig().setClientPassword("your-api-key");

          List<CountryAuthorization> countryAuthorizations = mangopay.getRegulatoryApi().getAllCountriesAuthorizations(new Pagination(1, 100), null);

          Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
          String prettyJson = prettyPrint.toJson(countryAuthorizations);

          System.out.println(prettyJson);   
      }
  }
  ```

  ```python Python   theme={null}
  from pprint import pprint
  import mangopay

  mangopay.client_id='your-client-id'
  mangopay.apikey='your-api-key'

  from mangopay.api import APIRequest
  handler = APIRequest(sandbox=True)

  from mangopay.resources import CountryAuthorization

  country_authorizations = CountryAuthorization.get_all_countries_authorizations()

  for country_authorization in country_authorizations:
      pprint(country_authorization._data)
      pprint(vars(country_authorization.authorization))
      print()  
  ```

  ```csharp .NET  theme={null}
  using MangoPay.SDK;
  using Newtonsoft.Json;

  class Program
  {
      static async Task Main(string[] args)
      {
          MangoPayApi api = new MangoPayApi();

          api.Config.ClientId = "your-client-id";
          api.Config.ClientPassword = "your-api-key";

          var countryAuthorizations = await api.Regulatory.GetAllCountriesAuthorizations();

          string prettyPrint = JsonConvert.SerializeObject(countryAuthorizations, Formatting.Indented);
          Console.WriteLine(prettyPrint);
      }
  }
  ```
</RequestExample>
