{"id":262,"date":"2023-06-09T10:45:30","date_gmt":"2023-06-09T10:45:30","guid":{"rendered":"https:\/\/developers.10npay.com\/?post_type=docs&#038;p=97"},"modified":"2023-06-09T10:45:30","modified_gmt":"2023-06-09T10:45:30","password":"","slug":"userinfo-endpoint","status":"publish","type":"docs","link":"https:\/\/developers.10npay.com\/bg\/docs\/userinfo-endpoint\/","title":{"rendered":"Userinfo Endpoint"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The UserInfo endpoint can be used to retrieve identity information about a user (see <a href=\"http:\/\/openid.net\/specs\/openid-connect-core-1_0.html#UserInfo\">spec<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The caller needs to send a valid access token representing the user. Depending on the granted scopes, the UserInfo endpoint will return the mapped claims (at least the openid scope is required).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Sample-Request.1\">Sample Request<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>GET <a href=\"https:\/\/auth.10npay.com\/connect\/userinfo\">https:\/\/auth.10npay.com\/connect\/userinfo<\/a><br>Authorization: Bearer &lt;access_token&gt;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Sample-Response.1\">Sample Response<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>HTTP\/1.1 200 OK<br>Content-Type: application\/json{&nbsp;&nbsp;&nbsp; &#8220;sub&#8221;: &#8220;10001&#8221;,&nbsp;&nbsp;&nbsp; &#8220;email&#8221;: &#8220;<a href=\"mailto:mail@example.com\">mail@example.com<\/a>&#8220;,&nbsp;&nbsp;&nbsp; &#8220;tenant&#8221;: &#8220;1&#8221;,&nbsp;&nbsp;&nbsp; &#8220;role&#8221;: [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;user&#8221;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;admin&#8221;&nbsp;&nbsp;&nbsp; ],&nbsp;&nbsp;&nbsp; &#8220;preferred_username&#8221;: &#8220;<a href=\"mailto:mail@example.com\">mail@example.com<\/a>&#8220;,&nbsp;&nbsp;&nbsp; &#8220;name&#8221;: &#8220;Bob Smith&#8221;,&nbsp;&nbsp;&nbsp; &#8220;email_verified&#8221;: &#8220;true&#8221;,&nbsp;&nbsp;&nbsp; &#8220;phone_number&#8221;: &#8220;+1234567890&#8221;,&nbsp;&nbsp;&nbsp; &#8220;phone_number_verified&#8221;: &#8220;true&#8221;}&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The UserInfo endpoint can be used to retrieve identity information about a user (see spec). The caller needs to send a valid access token representing the user. Depending on the granted scopes, the UserInfo endpoint will return the mapped claims (at least the openid scope is required). Sample Request GET https:\/\/auth.10npay.com\/connect\/userinfoAuthorization: Bearer &lt;access_token&gt; Sample Response [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[],"doc_tag":[],"knowledge_base":[33],"class_list":["post-262","docs","type-docs","status-publish","hentry","knowledge_base-10npay"],"year_month":"2026-06","word_count":138,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"","author_nicename":"","author_url":"https:\/\/developers.10npay.com\/bg\/author\/"},"doc_category_info":[],"doc_tag_info":[],"knowledge_base_info":[{"term_name":"10npay","term_url":"https:\/\/developers.10npay.com\/bg\/docs\/10npay\/","term_slug":"10npay"}],"knowledge_base_slug":["10npay"],"_links":{"self":[{"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/docs\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/comments?post=262"}],"version-history":[{"count":0,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/docs\/262\/revisions"}],"wp:attachment":[{"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/media?parent=262"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/doc_category?post=262"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/doc_tag?post=262"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/knowledge_base?post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}