প্রোফাইল পড়ুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আপনি Get Ready to Use the People API- এর ধাপগুলি সম্পূর্ণ করার পরে, আপনি প্রোফাইলের ডেটা পড়তে প্রস্তুত৷
নিম্নলিখিত কোড নমুনাগুলি দেখায় কিভাবে কয়েকটি সহজ অনুরোধ পাঠাতে হয়। পদ্ধতির সম্পূর্ণ তালিকার জন্য, রেফারেন্স ডকুমেন্টেশন দেখুন।
প্রমাণীকৃত ব্যবহারকারীর জন্য ব্যক্তি পান
ব্যবহারকারীর প্রোফাইল পেতে , নিম্নলিখিত কোড ব্যবহার করুন:
প্রোটোকল
GET /v1/people/me?personFields=names,emailAddresses HTTP/1.1
Host: people.googleapis.com
জাভা
Person profile = peopleService.people().get("people/me")
.setPersonFields("names,emailAddresses")
.execute();
পাইথন
profile = people_service.people()
.get('people/me', personFields='names,emailAddresses')
পিএইচপি
$profile = $people_service->people->get(
'people/me', array('personFields' => 'names,emailAddresses'));
.নেট
PeopleResource.GetRequest peopleRequest =
peopleService.People.Get("people/me");
peopleRequest.PersonFields = "names,emailAddresses";
Person profile = peopleRequest.Execute();
একটি Google অ্যাকাউন্ট আইডির জন্য ব্যক্তি পান
একটি Google অ্যাকাউন্ট আইডির জন্য ব্যক্তির তথ্য পেতে , নিম্নলিখিত কোডটি ব্যবহার করুন:
প্রোটোকল
GET /v1/people/account_id?personFields=names,emailAddresses HTTP/1.1
Host: people.googleapis.com
জাভা
Person profile = peopleService.people().get("people/account_id")
.setPersonFields("names,emailAddresses")
.execute();
পাইথন
profile = people_service.people()
.get('people/account_id', personFields='names,emailAddresses')
পিএইচপি
$profile = $people_service->people->get(
'people/account_id', array('personFields' => 'names,emailAddresses'));
.নেট
PeopleResource.GetRequest peopleRequest =
peopleService.People.Get("people/account_id");
peopleRequest.PersonFields = "names,emailAddresses";
Person profile = peopleRequest.Execute();
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThis page provides code samples demonstrating how to read profile data using the People API after completing the initial setup.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the authenticated user's profile, including names and email addresses, using the provided code snippets.\u003c/p\u003e\n"],["\u003cp\u003eThe guide also includes code examples for fetching profile information for a specific Google Account ID, specifying the desired person fields.\u003c/p\u003e\n"]]],["The provided code samples demonstrate how to retrieve profile data using the People API. Users can get the authenticated user's profile by sending a `GET` request to `/v1/people/me` or retrieve a profile by Google Account ID using `/v1/people/\u003caccount_id\u003e`. Both requests use the `personFields` parameter, specifying `names,emailAddresses` to filter for those specific fields. Different languages are exemplified such as Java, Python, PHP and .NET, showing how to form the API request.\n"],null,["# Read Profiles\n\n\u003cbr /\u003e\n\nAfter you've completed the steps in [Get Ready to Use the People API](/people/v1/getting-started), you are ready to read data for profiles.\n\nThe following code samples demonstrate how to send a few simple requests. For a full list of methods, see the [reference documentation](/people/api/rest).\n\nGet the person for the authenticated user\n-----------------------------------------\n\nTo [get the user's profile](/people/api/rest/v1/people/get), use the\nfollowing code: \n\n### Protocol\n\n```http\nGET /v1/people/me?personFields=names,emailAddresses HTTP/1.1\nHost: people.googleapis.com\n```\n\n### Java\n\n```java\nPerson profile = peopleService.people().get(\"people/me\")\n .setPersonFields(\"names,emailAddresses\")\n .execute();\n```\n\n### Python\n\n```python\nprofile = people_service.people()\n .get('people/me', personFields='names,emailAddresses')\n```\n\n### PHP\n\n```php\n$profile = $people_service-\u003epeople-\u003eget(\n 'people/me', array('personFields' =\u003e 'names,emailAddresses'));\n```\n\n### .NET\n\n```c#\nPeopleResource.GetRequest peopleRequest =\n peopleService.People.Get(\"people/me\");\npeopleRequest.PersonFields = \"names,emailAddresses\";\nPerson profile = peopleRequest.Execute();\n```\n\nGet the person for a Google Account ID\n--------------------------------------\n\nTo\n[get the person information for a Google Account ID](/people/api/rest/v1/people/get),\nuse the following code: \n\n### Protocol\n\n```http\nGET /v1/people/\u003cvar translate=\"no\"\u003eaccount_id\u003c/var\u003e?personFields=names,emailAddresses HTTP/1.1\nHost: people.googleapis.com\n```\n\n### Java\n\n```java\nPerson profile = peopleService.people().get(\"people/\u003cvar translate=\"no\"\u003eaccount_id\u003c/var\u003e\")\n .setPersonFields(\"names,emailAddresses\")\n .execute();\n```\n\n### Python\n\n```python\nprofile = people_service.people()\n .get('people/\u003cvar translate=\"no\"\u003eaccount_id\u003c/var\u003e', personFields='names,emailAddresses')\n```\n\n### PHP\n\n```php\n$profile = $people_service-\u003epeople-\u003eget(\n 'people/\u003cvar translate=\"no\"\u003eaccount_id\u003c/var\u003e', array('personFields' =\u003e 'names,emailAddresses'));\n```\n\n### .NET\n\n```c#\nPeopleResource.GetRequest peopleRequest =\n peopleService.People.Get(\"people/\u003cvar translate=\"no\"\u003eaccount_id\u003c/var\u003e\");\npeopleRequest.PersonFields = \"names,emailAddresses\";\nPerson profile = peopleRequest.Execute();\n```"]]