Actions181
- Account Actions
- Get Account
- Create Account
- Update Email
- Update Name
- Update Password
- Update Phone
- Update Status
- Get Preferences
- Update Preferences
- List Sessions
- Delete Sessions
- Get Session
- Update Session
- Delete Session
- Create Anonymous Session
- Create Email/Password Session
- Create Magic URL Session
- Create OAuth2 Session
- Create Phone Session
- Create Session from Token
- Create JWT
- Create Magic URL
- Create Phone Token
- Create Email Verification
- Update Email Verification
- Create Phone Verification
- Update Phone Verification
- Create Password Recovery
- Update Password Recovery
- Create Recovery
- Update Recovery
- Update MFA
- Create MFA Authenticator
- Update MFA Authenticator
- Delete MFA Authenticator
- Create MFA Challenge
- Update MFA Challenge
- Attribute Actions
- Avatars Actions
- Collection Actions
- Database Actions
- Document Actions
- Functions Actions
- Index Actions
- Locale Actions
- Messaging Actions
- Sites Actions
- Storage Actions
- Teams Actions
- Users Actions
Avatars → Get Country Flag
AI-generatedOverview
This node interacts with the Appwrite API to retrieve country flag images based on ISO Alpha-2 country codes. It is useful for applications that need to display country flags dynamically, such as user profiles, dashboards, or internationalization features. For example, it can fetch the flag of the United States by using the code 'us'.
Use Case Examples
- Fetching the flag of Germany using the country code 'de' to display on a user profile.
- Retrieving the flag of Japan with specific image dimensions for a travel website.
Properties
| Name | Meaning |
|---|---|
| Country Code | ISO Alpha-2 country code to specify which country's flag to retrieve (e.g., us, gb, de, fr, jp). |
| Width | Width of the flag image in pixels, ranging from 0 to 2000. Use 0 to keep the original width. |
| Height | Height of the flag image in pixels, ranging from 0 to 2000. Use 0 to keep the original height. |
| Quality | Quality of the flag image from 0 to 100, where higher values produce better quality images. |
Output
JSON
flagUrl- URL of the retrieved country flag image.
Dependencies
- Requires an Appwrite API key credential with endpoint, project ID, and API key for authentication.
Troubleshooting
- Common issues include invalid or missing country codes, which may result in errors or no image returned. Ensure the country code is a valid ISO Alpha-2 code.
- Errors related to authentication failures due to incorrect or expired API keys. Verify the API credentials are correct and have necessary permissions.
- Image dimension parameters (width and height) must be within the allowed range (0-2000). Values outside this range may cause errors or unexpected results.
Links
- Appwrite Avatars - Country Flag - Official documentation for retrieving country flag avatars using the Appwrite API.