> ## 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.

# View Authorizations for a country

This call returns the restrictions for a specific country.

### Path parameters

<ParamField path="CountryCode" type="string" required>
  Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))

  The code of the country.
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200" defaultOpen>
    <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>
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json 200   theme={null}
  {
      "CountryCode":"FR",
      "CountryName":"France",
      "Authorization":{
          "BlockUserCreation":false,
          "BlockBankAccountCreation":false,
          "BlockPayout":false
      },
      "LastUpdate":1463494366
  }  
  ```
</ResponseExample>

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

  let myCountry = {
    code: 'FR'
  }

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

  viewCountryAuthorizations(myCountry.code)  
  ```

  ```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 viewCountryAuthorization(countryCode)
      begin
          response = MangoPay::Regulatory.get_country_authorizations(countryCode)
          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

  myCountry = {
      Code: 'FR'
  }

  viewCountryAuthorization(myCountry[:Code])  
  ```

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

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

          CountryAuthorization viewCountryAuthorization = mangopay.getRegulatoryApi().getCountryAuthorizations(CountryIso.FR);

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

          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

  view_country_authorization = CountryAuthorization.get_country_authorizations(country_code='FR')

  pprint(view_country_authorization._data)
  pprint(vars(view_country_authorization.authorization))  
  ```

  ```csharp .NET  theme={null}
  using MangoPay.SDK;
  using MangoPay.SDK.Core.Enumerations;
  using MangoPay.SDK.Entities.GET;
  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";

          CountryAuthorizationDTO countryAuthorization = await api.Regulatory.GetCountryAuthorizations(CountryIso.FR);

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