Hi Team,
As per the docs for share profile api only hipId is mandatory and code is not.
So I am trying with a sample hip it is giving the below error.
Curl:
curl --location --request POST ‘https://dev.abdm.gov.in/cm/patients/profile/share’
–header ‘pragma: no-cache’
–header ‘cache-control: no-cache’
–header ‘sec-ch-ua: " Not A;Brand";v=“99”, “Chromium”;v=“96”, “Google Chrome”;v=“96”’
–header ‘sec-ch-ua-mobile: ?1’
–header ‘user-agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Mobile Safari/537.36’
–header ‘content-type: application/json’
–header ‘x-auth-token: Bearer eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJidXNocmExMjNAc2J4IiwiY2xpZW50SWQiOiJQSFItV0VCIiwic3lzdGVtIjoiQUJIQS1BIiwicmVxdWVzdGVySWQiOiJQSFItV0VCIiwicGhyTW9iaWxlIjoiOTE5ODAyMjQwMCIsImV4cCI6MTY0ODczMDEzMSwiaWF0IjoxNjQ4NzIyOTMxLCJwaHJBZGRyZXNzIjoiYnVzaHJhMTIzQHNieCIsInR4bklkIjoiNDA0OTIyNTktOWM3My00NDI3LWI0ZGUtYzA5ODhjMTg3NTU0In0.j0dyB6fU9UA9E7stApzEp3_OdxctiIkWOWtERhRUzd9qQB58fQkkufDyM4_Q0iG2Z-NtG_nbDl9mGKoHogWwXGju2Sa87NpHt6ExMWsD5P5f1hJgHQzAtorEyfTCWjciRv1_s5AfauCwv-GHdYzqwEW3OW6lZLH3d4FOXNBLdVh97iJyIutAmuRmHTU0tLo91jX2OmS0DbV80P50aMo2AuzRBUhGh7PqHNnwCuBtFn_-F4c-WPjB14uBw6mdXd0nTOUvSWbOU1Q_JbZBocI3m_ZMKw5xXEX_FmkqJuH3eIG4KgfyXRTmdA_NfODHALkPx4B95-wUU_VKNCRrBHVZpw’
–header ‘x-cm-id: SBX_000402’
–header ‘sec-ch-ua-platform: “Android”’
–header ‘accept: /’
–header ‘sec-fetch-site: cross-site’
–header ‘sec-fetch-mode: cors’
–header ‘sec-fetch-dest: empty’
–header ‘accept-language: en-GB,en-US;q=0.9,en;q=0.8’
–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2NDg3MjM4MTQsImlhdCI6MTY0ODcyMzIxNCwianRpIjoiMTUwNzYzMDQtMWIxOC00MjFjLWE4MzQtNDlhMzY3ZWRlNDI1IiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJhNzIxM2I3MS0zZWExLTQ1OGEtOGYyNC0yZDFiMWFlZDg5ZDQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJTQlhfMDAwNDAyIiwic2Vzc2lvbl9zdGF0ZSI6IjlmN2FhM2M1LWIwMTMtNDkyYy1hNTMxLTQzMzY3NDdlNzAwZSIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImhlYWx0aElkIiwiT0lEQyIsImhpcCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IlNCWF8wMDA0MDIiOnsicm9sZXMiOlsidW1hX3Byb3RlY3Rpb24iXX0sImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJjbGllbnRIb3N0IjoiMTAuMjMzLjY4LjEyMiIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiY2xpZW50SWQiOiJTQlhfMDAwNDAyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoic2VydmljZS1hY2NvdW50LXNieF8wMDA0MDIiLCJjbGllbnRBZGRyZXNzIjoiMTAuMjMzLjY4LjEyMiJ9.Ti_Vvj3t__Sjy3pYKQd64deQU9ZydgjE_6Ql3kzHoyTEE1kyu0J7O8rCJdhufA5O1QywVX0K2h4giH45FUvNX6ExQjKZjgA-rPO8344d0TNeHMeGGwKFkE3xQyE4C4L8C0QUwy5OrdPxioYMWMQc5FYqyrOMLn4aShniogpa18guY9RefbWf-FbRYwQrIjUAT9QuwRwKmSGH1F0JH9LxAay4OG5q3VZ66YdYwhNX0MVaA3aXEvR6DQffw0-QvRAiScl6I7wAK4PZpL1O88ATEFKHjkiDvCUJh3_lAr9j2vRiwN63mTWCVSKpr4g2FmCZuxKdcmbvak9eqq8fr6OI9g’
–header ‘Cookie: TS011c04bd=01115a1c90b4b55aa64bad057d98351028cec85fdc92b024ee9b4f1c1f5ac4b632c0d0445cbcce6b0b0e06e700b0107a2d394eb8ef’
–data-raw ‘{
“requestId”: “1949a2d4-cdf9-4eac-83b8-d6364ccd197c”,
“hipDetails”: {
“hipId”: “ehosp@nic”
}
}’
Response:
{
“error”: {
“code”: 1500,
“message”: “Error in making call to target system Content type ‘text/plain;charset=UTF-8’ not supported for bodyType=java.util.HashMap<?, ?>”
}
}
Also if I am adding the code value (for this hipId I had the code value) in the request body then the api is working correctly.
Moreover from this page https://phrbeta.abdm.gov.in/uhi/1234, I am only getting hipId for Paytm app.
(response:- qr_data=hipId=1234)
How to get the code value ?
Please check this.