আপনি একটি ব্র্যান্ডের জন্য একটি বিজনেস মেসেজ এজেন্ট তৈরি করার পরে যেটি আপনি এজেন্টের তথ্য পরিচালনা করেন এবং চূড়ান্ত করেন, আপনি এজেন্ট এবং যেকোনো সংশ্লিষ্ট অবস্থান যাচাই করতে পারেন। তারা লঞ্চ করার আগে আপনাকে অবশ্যই এজেন্ট এবং অবস্থান যাচাই করতে হবে।
এজেন্ট যাচাইকরণ
আপনি যখন কোনো এজেন্ট যাচাই করেন, তখন বিজনেস মেসেজ এজেন্ট যে ব্র্যান্ডের প্রতিনিধিত্ব করে তার পরিচিতির সাথে এজেন্টের তথ্য নিশ্চিত করে। একবার ব্র্যান্ডের পরিচিতি নিশ্চিত করে যে আপনি এজেন্টের সাথে ব্র্যান্ডের প্রতিনিধিত্ব করতে পারেন এবং এজেন্টের তথ্য সঠিক, এজেন্ট যাচাই করা হয়।
প্রাক-যাচাই চেকলিস্ট
আপনি আপনার এজেন্ট যাচাই করার আগে, যাচাইকরণ প্রক্রিয়া চলাকালীন উপস্থিত হতে পারে এমন কোনো সমস্যা ধরতে নিম্নলিখিত চেকলিস্টটি ব্যবহার করুন।
এজেন্ট তথ্য |
---|
এজেন্ট নাম প্রয়োজন। এজেন্টের নাম, এটি ব্যবহারকারীদের কাছে প্রদর্শিত হয়। একটি এজেন্ট তৈরি করুন দেখুন। |
এজেন্ট লোগো প্রয়োজন। এজেন্টের লোগো, এটি ব্যবহারকারীদের কাছে প্রদর্শিত হয়। একটি এজেন্ট তৈরি করুন দেখুন। |
বার্তা প্রাপ্যতা প্রয়োজন। লাইভ এজেন্ট যে দিন এবং সময় ব্যবহারকারীদের প্রতিক্রিয়া জানাতে উপলব্ধ। বার্তাপ্রেরণের প্রাপ্যতা সেট করুন দেখুন। |
অ-স্থানীয় তথ্য অ-স্থানীয় এন্ট্রি পয়েন্টের জন্য প্রয়োজনীয়। এজেন্টের সংশ্লিষ্ট ডোমেন, ফোন নম্বর এবং উপলব্ধ লঞ্চ অঞ্চল। অ-স্থানীয় তথ্য সেট করুন দেখুন। |
ডিফল্ট লোকেল প্রয়োজন। এজেন্ট সাধারণত যে লোকেলে যোগাযোগ করে। স্থানীয়করণ এবং লোকেল দেখুন। |
OAuth কনফিগারেশন ঐচ্ছিক। অন্যান্য পণ্যের সাথে এজেন্টের OAuth ইন্টিগ্রেশন সম্পর্কে বিশদ বিবরণ। OAuth দিয়ে প্রমাণীকরণ দেখুন। |
অনুমোদিত এন্ট্রি পয়েন্ট প্রয়োজন। আপনি ব্যবসায়িক যোগাযোগ API দিয়ে এজেন্ট তৈরি করেছেন কিনা তা পরীক্ষা করার জন্য শুধুমাত্র প্রয়োজন। একটি এজেন্ট তৈরি করুন দেখুন। |
আপনি আপনার এজেন্ট যাচাই করার পরে, আপনি শুধুমাত্র নিম্নলিখিত আইটেম আপডেট করতে পারেন:
-
conversationalSettings
-
customAgentId
-
defaultLocale
-
primaryAgentInteraction
-
additionalAgentInteractions
-
phone
আপনার এজেন্ট যাচাই করার পর যদি আপনি শুধুমাত্র পঠনযোগ্য ক্ষেত্রগুলি আপডেট করতে চান,আমাদের সাথে যোগাযোগ করুন। (আপনাকে প্রথমে একটি ব্যবসায়িক বার্তা Google অ্যাকাউন্ট দিয়ে সাইন ইন করতে হবে। একটি অ্যাকাউন্টের জন্য নিবন্ধন করতে, ব্যবসা বার্তাগুলির সাথে নিবন্ধন দেখুন।)
পূর্বশর্ত
আপনি আপনার এজেন্ট যাচাই করার আগে, আপনাকে কিছু তথ্য সংগ্রহ করতে হবে:
এজেন্টের
name
আপনি যদি কোনো এজেন্টের নাম না জানেন, তাহলে একটি ব্র্যান্ডের জন্য সমস্ত এজেন্টদের তালিকা দেখুন৷
আপনার ডেভেলপমেন্ট মেশিনে আপনার GCP প্রকল্পের পরিষেবা অ্যাকাউন্ট কী-এর পথ
- অংশীদারের নাম (আপনার প্রতিষ্ঠানের নাম)
- অংশীদার ইমেল (আপনার ইমেল)
- "https://" দিয়ে শুরু হওয়া সর্বজনীনভাবে উপলব্ধ URL হিসাবে এজেন্ট যে ব্র্যান্ডের প্রতিনিধিত্ব করে তার ওয়েবসাইট
- এজেন্ট যে ব্র্যান্ডের প্রতিনিধিত্ব করে তার জন্য যোগাযোগের নাম এবং ইমেল (সাধারণত ব্র্যান্ড ওয়েবসাইটের সাথে একটি ডোমেন শেয়ার করে) যারা ব্র্যান্ডের সাথে আপনার ব্যবসায়িক সম্পর্ক এবং ব্র্যান্ডের প্রতিনিধিত্ব করার জন্য আপনার কর্তৃত্ব যাচাই করতে পারে
একটি এজেন্ট যাচাই করুন
আপনি যখন কোনো এজেন্টের জন্য যাচাইকরণের অনুরোধ করেন, তখন বিজনেস মেসেজ আপনার এজেন্টের তথ্য নিশ্চিত করতে আপনার নির্দিষ্ট করা ব্র্যান্ডের পরিচিতিকে ইমেল করে।
যখন ব্র্যান্ডের পরিচিতি আপনার এজেন্টের তথ্য যাচাই করে এবং ব্যবসায়িক বার্তা আপনার এজেন্টকে যাচাই করে, তখন আপনি একটি ইমেল পাবেন।
একটি এজেন্ট যাচাই করতে, নিম্নলিখিত কমান্ডটি চালান। পূর্বশর্তগুলিতে চিহ্নিত মানগুলির সাথে ভেরিয়েবলগুলি প্রতিস্থাপন করুন।
cURL
# This code requests a verification of a Business Messages agent. # Read more: https://developers.google.com/business-communications/business-messages/guides/how-to/verify?method=api#verify_an_agent # Replace the __BRAND_ID__ and __AGENT_ID__ # Make sure a service account key file exists at ./service_account_key.json curl -X POST \ "https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/agents/__AGENT_ID__:requestVerification" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/business-communications" \ -H "$(oauth2l header --json ./service_account_key.json businesscommunications)" \ -d '{ "agentVerificationContact": { "partnerName": "Partner name", "partnerEmailAddress": "partner@email.com", "brandContactName": "Brand contact name", "brandContactEmailAddress": "brand-contact@email.com", "brandWebsiteUrl": "https://www.your-company-website.com" } }'
Node.js
/** * This code snippet requests an agent verification. * Read more: https://developers.google.com/business-communications/business-messages/guides/how-to/verify?method=api#verify_an_agent * * This code is based on the https://github.com/google-business-communications/nodejs-businesscommunications Node.js * Business Communications client library. */ /** * Edit the values below: */ const BRAND_ID = 'EDIT_HERE'; const AGENT_ID = 'EDIT_HERE'; const PATH_TO_SERVICE_ACCOUNT_KEY = './service_account_key.json'; const businesscommunications = require('businesscommunications'); const {google} = require('googleapis'); // Initialize the Business Communications API const bcApi = new businesscommunications.businesscommunications_v1.Businesscommunications({}); // Set the scope that we need for the Business Communications API const scopes = [ 'https://www.googleapis.com/auth/businesscommunications', ]; // Set the private key to the service account file const privatekey = require(PATH_TO_SERVICE_ACCOUNT_KEY); async function main() { const authClient = await initCredentials(); const agentName = 'brands/' + BRAND_ID + '/agents/' + AGENT_ID; if (authClient) { const agentVerificationContact = { agentVerificationContact: { partnerName: 'Partner name', partnerEmailAddress: 'partner@email.com', brandContactName: 'Brand contact name', brandContactEmailAddress: 'brand-contact@email.com', brandWebsiteUrl: 'https://www.your-company-website.com', }, }; // Setup the parameters for the API call const apiParams = { auth: authClient, name: agentName, resource: agentVerificationContact, }; bcApi.brands.agents.requestVerification(apiParams, {}, (err, response) => { if (err !== undefined && err !== null) { console.dir(err); } else { // Agent found console.log(response.data); } }); } else { console.log('Authentication failure.'); } } /** * Initializes the Google credentials for calling the * Business Messages API. */ async function initCredentials() { // Configure a JWT auth client const authClient = new google.auth.JWT( privatekey.client_email, null, privatekey.private_key, scopes, ); return new Promise(function(resolve, reject) { // Authenticate request authClient.authorize(function(err, tokens) { if (err) { reject(false); } else { resolve(authClient); } }); }); } main();
জাভা
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; import com.google.api.client.http.HttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.businesscommunications.v1.BusinessCommunications; import com.google.api.services.businesscommunications.v1.model.Agent; import java.io.FileInputStream; import java.util.Arrays; class Main { /** * Initializes credentials used by the Business Communications API. */ private static BusinessCommunications.Builder getBusinessCommunicationsBuilder() { BusinessCommunications.Builder builder = null; try { GoogleCredential credential = GoogleCredential .fromStream(new FileInputStream("PATH_TO_SERVICE_ACCOUNT_KEY")); credential = credential.createScoped(Arrays.asList( "https://www.googleapis.com/auth/businesscommunications")); credential.refreshToken(); HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); JacksonFactory jsonFactory = JacksonFactory.getDefaultInstance(); // Create instance of the Business Communications API builder = new BusinessCommunications .Builder(httpTransport, jsonFactory, null) .setApplicationName(credential.getServiceAccountProjectId()); // Set the API credentials and endpoint builder.setHttpRequestInitializer(credential); } catch (Exception e) { e.printStackTrace(); } return builder; } public static void main(String args[]) { try { // Create client library reference BusinessCommunications.Builder builder = getBusinessCommunicationsBuilder(); String agentName = "brands/BRAND_ID/agents/AGENT_ID"; BusinessCommunications.Brands.Agents.RequestVerification request = builder.build().brands().agents().requestVerification(agentName, new RequestAgentVerificationRequest().setAgentVerificationContact( new AgentVerificationContact() .setPartnerName("PARTNER_NAME") .setPartnerEmailAddress("PARTNER_EMAIL") .setBrandContactName("BRAND_CONTACT_NAME") .setBrandContactEmailAddress("BRAND_CONTACT_EMAIL") .setBrandWebsiteUrl("BRAND_WEBSITE_URL"))); System.out.println(request.execute().toPrettyString()); } catch (Exception e) { e.printStackTrace(); } } }এই কোডটি জাভা বিজনেস কমিউনিকেশনস ক্লায়েন্ট লাইব্রেরির উপর ভিত্তি করে।
পাইথন
"""This code requests a verification of a Business Messages agent. Read more: https://developers.google.com/business-communications/business-messages/guides/how-to/verify?method=api#verify_an_agent This code is based on the https://github.com/google-business-communications/python-businessmessages Python Business Messages client library. """ from oauth2client.service_account import ServiceAccountCredentials from businesscommunications.businesscommunications_v1_client import BusinesscommunicationsV1 from businesscommunications.businesscommunications_v1_messages import ( BusinesscommunicationsBrandsAgentsRequestVerificationRequest, RequestAgentVerificationRequest, AgentVerificationContact ) # Edit the values below: BRAND_ID = 'EDIT_HERE' AGENT_ID = 'EDIT_HERE' SCOPES = ['https://www.googleapis.com/auth/businesscommunications'] SERVICE_ACCOUNT_FILE = './service_account_key.json' credentials = ServiceAccountCredentials.from_json_keyfile_name( SERVICE_ACCOUNT_FILE, scopes=SCOPES) client = BusinesscommunicationsV1(credentials=credentials) agents_service = BusinesscommunicationsV1.BrandsAgentsService(client) agent_name = 'brands/' + BRAND_ID + '/agents/' + AGENT_ID verification_request = agents_service.RequestVerification(BusinesscommunicationsBrandsAgentsRequestVerificationRequest( name=agent_name, requestAgentVerificationRequest=RequestAgentVerificationRequest( agentVerificationContact=AgentVerificationContact( partnerName='Partner name', partnerEmailAddress='partner@email.com', brandContactName='Brand contact name', brandContactEmailAddress='brand-contact@email.com', brandWebsiteUrl='https://www.your-company-website.com' )) )) print(verification_request)
বিন্যাস এবং মান বিকল্পের জন্য, brands.agents.requestVerification
দেখুন।
এজেন্টের যাচাইকরণের অবস্থা পান
আপনি একটি এজেন্ট যাচাইকরণের অনুরোধ করার পরে, আপনি আপনার এজেন্টের যাচাইকরণের অবস্থা পরীক্ষা করতে পারেন।
এজেন্টের যাচাইকরণের অবস্থা পেতে, নিম্নলিখিত কমান্ডটি চালান। পূর্বশর্তগুলিতে চিহ্নিত মানগুলির সাথে ভেরিয়েবলগুলি প্রতিস্থাপন করুন।
cURL
# This code gets the agent verification state. # Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.locations/getVerification # Replace the __BRAND_ID__ and __AGENT_ID__ # Make sure a service account key file exists at ./service_account_key.json curl -X GET \ "https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/agents/__AGENT_ID__/verification" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/business-communications" \ -H "$(oauth2l header --json ./service_account_key.json businesscommunications)"
Node.js
/** * This code snippet gets an agent verification state. * Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.locations/getVerification * * This code is based on the https://github.com/google-business-communications/nodejs-businesscommunications Node.js * Business Communications client library. */ /** * Edit the values below: */ const BRAND_ID = 'EDIT_HERE'; const AGENT_ID = 'EDIT_HERE'; const PATH_TO_SERVICE_ACCOUNT_KEY = './service_account_key.json'; const businesscommunications = require('businesscommunications'); const {google} = require('googleapis'); // Initialize the Business Communications API const bcApi = new businesscommunications.businesscommunications_v1.Businesscommunications({}); // Set the scope that we need for the Business Communications API const scopes = [ 'https://www.googleapis.com/auth/businesscommunications', ]; // Set the private key to the service account file const privatekey = require(PATH_TO_SERVICE_ACCOUNT_KEY); async function main() { const authClient = await initCredentials(); const agentName = 'brands/' + BRAND_ID + '/agents/' + AGENT_ID; if (authClient) { // Setup the parameters for the API call const apiParams = { auth: authClient, name: agentName + '/verification', }; bcApi.brands.agents.getVerification(apiParams, {}, (err, response) => { if (err !== undefined && err !== null) { console.dir(err); } else { // Agent found console.log(response.data); } }); } else { console.log('Authentication failure.'); } } /** * Initializes the Google credentials for calling the * Business Messages API. */ async function initCredentials() { // Configure a JWT auth client const authClient = new google.auth.JWT( privatekey.client_email, null, privatekey.private_key, scopes, ); return new Promise(function(resolve, reject) { // Authenticate request authClient.authorize(function(err, tokens) { if (err) { reject(false); } else { resolve(authClient); } }); }); } main();
জাভা
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; import com.google.api.client.http.HttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.businesscommunications.v1.BusinessCommunications; import com.google.api.services.businesscommunications.v1.model.Agent; import java.io.FileInputStream; import java.util.Arrays; class Main { /** * Initializes credentials used by the Business Communications API. */ private static BusinessCommunications.Builder getBusinessCommunicationsBuilder() { BusinessCommunications.Builder builder = null; try { GoogleCredential credential = GoogleCredential .fromStream(new FileInputStream("PATH_TO_SERVICE_ACCOUNT_KEY")); credential = credential.createScoped(Arrays.asList( "https://www.googleapis.com/auth/businesscommunications")); credential.refreshToken(); HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); JacksonFactory jsonFactory = JacksonFactory.getDefaultInstance(); // Create instance of the Business Communications API builder = new BusinessCommunications .Builder(httpTransport, jsonFactory, null) .setApplicationName(credential.getServiceAccountProjectId()); // Set the API credentials and endpoint builder.setHttpRequestInitializer(credential); } catch (Exception e) { e.printStackTrace(); } return builder; } public static void main(String args[]) { try { // Create client library reference BusinessCommunications.Builder builder = getBusinessCommunicationsBuilder(); String agentName = "brands/BRAND_ID/agents/AGENT_ID/verification"; BusinessCommunications.Brands.Agents.GetVerification request = builder.build().brands().agents().getVerification(agentName); System.out.println(request.execute().toPrettyString()); } catch (Exception e) { e.printStackTrace(); } } }এই কোডটি জাভা বিজনেস কমিউনিকেশনস ক্লায়েন্ট লাইব্রেরির উপর ভিত্তি করে।
পাইথন
"""This code gets the agent verification state. Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.locations/getVerification This code is based on the https://github.com/google-business-communications/python-businessmessages Python Business Messages client library. """ from oauth2client.service_account import ServiceAccountCredentials from businesscommunications.businesscommunications_v1_client import BusinesscommunicationsV1 from businesscommunications.businesscommunications_v1_messages import ( BusinesscommunicationsBrandsAgentsGetVerificationRequest, ) # Edit the values below: BRAND_ID = 'EDIT_HERE' AGENT_ID = 'EDIT_HERE' SCOPES = ['https://www.googleapis.com/auth/businesscommunications'] SERVICE_ACCOUNT_FILE = './service_account_key.json' credentials = ServiceAccountCredentials.from_json_keyfile_name( SERVICE_ACCOUNT_FILE, scopes=SCOPES) client = BusinesscommunicationsV1(credentials=credentials) agents_service = BusinesscommunicationsV1.BrandsAgentsService(client) agent_name = 'brands/' + BRAND_ID + '/agents/' + AGENT_ID + '/verification' verification_state = agents_service.GetVerification(BusinesscommunicationsBrandsAgentsGetVerificationRequest( name=agent_name )) print(verification_state)
বিন্যাস এবং মান বিকল্পের জন্য, brands.agents.getVerification
দেখুন।
এজেন্ট যাচাইকরণের অনুরোধ বাতিল করুন
আপনি যদি আবিষ্কার করেন যে এজেন্টের তথ্য ভুল বা এজেন্ট অন্যথায় যাচাইকরণের জন্য প্রস্তুত নয়, আপনি মুলতুবি থাকা যাচাইকরণের অনুরোধ বাতিল করতে পারেন। আপনি একটি অনুরোধ বাতিল করলে, ব্যবসায়িক বার্তাগুলি আপনার ব্র্যান্ডের পরিচিতিকে সূচিত করে এবং যাচাইকরণ প্রক্রিয়া পুনরায় চালু করার জন্য আপনাকে একটি নতুন যাচাইকরণের অনুরোধ করতে হবে।
একটি এজেন্ট যাচাইকরণের অনুরোধ বাতিল করতে, নিম্নলিখিত কমান্ডটি চালান। পূর্বশর্তগুলিতে চিহ্নিত মানগুলির সাথে ভেরিয়েবলগুলি প্রতিস্থাপন করুন।
cURL
# This code updates the verification state of an agent. # Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.agents/updateVerification # Replace the __BRAND_ID__ and __AGENT_ID__ # Make sure a service account key file exists at ./service_account_key.json curl -X PATCH \ "https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/agents/__AGENT_ID__/verification" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/business-communications" \ -H "$(oauth2l header --json ./service_account_key.json businesscommunications)" \ -d '{ "verificationState": "VERIFICATION_STATE_UNVERIFIED" }'
Node.js
/** * This code snippet updates the state of an agent verification. * Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.agents/updateVerification * * This code is based on the https://github.com/google-business-communications/nodejs-businesscommunications Node.js * Business Communications client library. */ /** * Edit the values below: */ const BRAND_ID = 'EDIT_HERE'; const AGENT_ID = 'EDIT_HERE'; const PATH_TO_SERVICE_ACCOUNT_KEY = './service_account_key.json'; const businesscommunications = require('businesscommunications'); const {google} = require('googleapis'); // Initialize the Business Communications API const bcApi = new businesscommunications.businesscommunications_v1.Businesscommunications({}); // Set the scope that we need for the Business Communications API const scopes = [ 'https://www.googleapis.com/auth/businesscommunications', ]; // Set the private key to the service account file const privatekey = require(PATH_TO_SERVICE_ACCOUNT_KEY); async function main() { const authClient = await initCredentials(); const agentName = 'brands/' + BRAND_ID + '/agents/' + AGENT_ID; if (authClient) { // Setup the parameters for the API call const apiParams = { auth: authClient, name: agentName + '/verification', updateMask: 'verificationState', resource: { name: agentName, verificationState: 'VERIFICATION_STATE_UNVERIFIED', } }; bcApi.brands.agents.updateVerification(apiParams, {}, (err, response) => { if (err !== undefined && err !== null) { console.dir(err); } else { // Agent found console.log(response.data); } }); } else { console.log('Authentication failure.'); } } /** * Initializes the Google credentials for calling the * Business Messages API. */ async function initCredentials() { // Configure a JWT auth client const authClient = new google.auth.JWT( privatekey.client_email, null, privatekey.private_key, scopes, ); return new Promise(function(resolve, reject) { // Authenticate request authClient.authorize(function(err, tokens) { if (err) { reject(false); } else { resolve(authClient); } }); }); } main();
জাভা
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; import com.google.api.client.http.HttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.businesscommunications.v1.BusinessCommunications; import com.google.api.services.businesscommunications.v1.model.Agent; import java.io.FileInputStream; import java.util.Arrays; class Main { /** * Initializes credentials used by the Business Communications API. */ private static BusinessCommunications.Builder getBusinessCommunicationsBuilder() { BusinessCommunications.Builder builder = null; try { GoogleCredential credential = GoogleCredential .fromStream(new FileInputStream("PATH_TO_SERVICE_ACCOUNT_KEY")); credential = credential.createScoped(Arrays.asList( "https://www.googleapis.com/auth/businesscommunications")); credential.refreshToken(); HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); JacksonFactory jsonFactory = JacksonFactory.getDefaultInstance(); // Create instance of the Business Communications API builder = new BusinessCommunications .Builder(httpTransport, jsonFactory, null) .setApplicationName(credential.getServiceAccountProjectId()); // Set the API credentials and endpoint builder.setHttpRequestInitializer(credential); } catch (Exception e) { e.printStackTrace(); } return builder; } public static void main(String args[]) { try { // Create client library reference BusinessCommunications.Builder builder = getBusinessCommunicationsBuilder(); String agentName = "brands/BRAND_ID/agents/AGENT_ID/verification"; BusinessCommunications.Brands.Agents.UpdateVerification request = builder.build().brands().agents().updateVerification(agentName, new AgentVerification().setVerificationState("VERIFICATION_STATE_UNVERIFIED")); System.out.println(request.execute().toPrettyString()); } catch (Exception e) { e.printStackTrace(); } } }এই কোডটি জাভা বিজনেস কমিউনিকেশনস ক্লায়েন্ট লাইব্রেরির উপর ভিত্তি করে।
পাইথন
"""This code updates the verification state of an agent. Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.agents/updateVerification This code is based on the https://github.com/google-business-communications/python-businessmessages Python Business Messages client library. """ from oauth2client.service_account import ServiceAccountCredentials from businesscommunications.businesscommunications_v1_client import BusinesscommunicationsV1 from businesscommunications.businesscommunications_v1_messages import ( AgentVerification, BusinesscommunicationsBrandsAgentsUpdateVerificationRequest, ) # Edit the values below: BRAND_ID = 'EDIT_HERE' AGENT_ID = 'EDIT_HERE' SCOPES = ['https://www.googleapis.com/auth/businesscommunications'] SERVICE_ACCOUNT_FILE = './service_account_key.json' credentials = ServiceAccountCredentials.from_json_keyfile_name( SERVICE_ACCOUNT_FILE, scopes=SCOPES) client = BusinesscommunicationsV1(credentials=credentials) agents_service = BusinesscommunicationsV1.BrandsAgentsService(client) agent_name = 'brands/' + BRAND_ID + '/agents/' + AGENT_ID + '/verification' update_request = agents_service.UpdateVerification( BusinesscommunicationsBrandsAgentsUpdateVerificationRequest( name=agent_name, updateMask='verificationState', agentVerification=AgentVerification(verificationState=AgentVerification.VerificationStateValueValuesEnum.VERIFICATION_STATE_UNVERIFIED) ) ) print(update_request)
বিন্যাস এবং মান বিকল্পের জন্য, brands.agents.updateVerification
দেখুন।
অবস্থান যাচাইকরণ
আপনি একটি এজেন্ট যাচাই করার পরে, আপনি সেই এজেন্টের সাথে যুক্ত অবস্থানগুলি যাচাই করতে পারেন৷ একবার একটি অবস্থান যাচাই করা হয়ে গেলে এবং সংশ্লিষ্ট এজেন্ট চালু হলে, আপনি এজেন্টের সাথে ব্যবহারের জন্য অবস্থানটি চালু করতে পারেন।
যদি ব্র্যান্ডটি একটি চেইনের অংশ হয়, তাহলে আপনাকে অবশ্যই সেই চেইনের জন্য সমস্ত অবস্থান যোগ করতে হবে যেখানে আপনার কাছে মেসেজিং সক্ষম করার অনুমতি আছে৷ আপনার যোগ করা সমস্ত অবস্থান যাচাই করতে, শুধুমাত্র একটি অবস্থানের জন্য যাচাইকরণের অনুরোধ করুন । একবার আমরা সেই অবস্থানটি যাচাই করলে, আমরা স্বয়ংক্রিয়ভাবে আপনার যুক্ত করা অন্যান্য সংশ্লিষ্ট অবস্থানগুলি যাচাই করব।
যাচাইকরণের পর, আপনি যদি অতিরিক্ত অবস্থান যোগ করেন, তাহলে আপনাকে আবার লোকেশন যাচাইয়ের অনুরোধ করতে হবে। কোনো অবস্থান স্বয়ংক্রিয়ভাবে যাচাই করা না হলে, ব্যবসা এবং অবস্থানের বিশদ বিবরণ সহ আমাদের সাথে যোগাযোগ করুন।
প্রাক-যাচাই চেকলিস্ট
আপনি আপনার অবস্থান যাচাই করার আগে, যাচাইকরণ প্রক্রিয়া চলাকালীন প্রদর্শিত হতে পারে এমন কোনো সমস্যা ধরতে নিম্নলিখিত চেকলিস্টটি ব্যবহার করুন৷
এজেন্ট তথ্য |
---|
এজেন্ট যাচাইকরণ প্রয়োজন। যাচাই করুন যে এজেন্টের তথ্য সঠিক এবং এজেন্ট সংশ্লিষ্ট ব্র্যান্ডের প্রতিনিধিত্ব করতে পারে। এজেন্ট এবং অবস্থান যাচাই দেখুন। |
অবস্থানগত তথ্য |
---|
স্থান আইডি প্রয়োজন। Google Places ডাটাবেসে এবং Google মানচিত্রে একটি অবস্থানের জন্য অনন্য শনাক্তকারী৷ অবস্থানগুলি পরিচালনা দেখুন। |
অনুমোদিত এন্ট্রি পয়েন্ট প্রয়োজন। আপনি ব্যবসায়িক যোগাযোগ API দিয়ে এজেন্ট তৈরি করেছেন কিনা তা পরীক্ষা করার জন্য শুধুমাত্র প্রয়োজন। অবস্থানগুলি পরিচালনা দেখুন। |
পূর্বশর্ত
আপনি আপনার এজেন্ট যাচাই করার আগে, আপনাকে কিছু তথ্য সংগ্রহ করতে হবে:
অবস্থানের
name
আপনি যদি কোনো এজেন্টের নাম না জানেন, একটি ব্র্যান্ডের জন্য সমস্ত অবস্থানের তালিকা দেখুন৷
আপনার ডেভেলপমেন্ট মেশিনে আপনার GCP প্রকল্পের পরিষেবা অ্যাকাউন্ট কী-এর পথ
একটি অবস্থান যাচাই করুন
আপনি যখন একটি অবস্থানের জন্য যাচাইকরণের অনুরোধ করেন, তখন ব্যবসার বার্তা নিশ্চিত করে যে অবস্থানটি সংশ্লিষ্ট এজেন্টের প্রতিনিধিত্বকারী ব্র্যান্ডের সাথে মেলে। অবস্থান যাচাইকরণ সম্পূর্ণ হলে আপনি একটি ইমেল পাবেন।
আপনি একটি অবস্থান যাচাই করার পরে, আপনি এটিতে কোনো আপডেট করতে পারবেন না৷ একটি অবস্থান যাচাই করার পরে আপডেট করতে,আমাদের সাথে যোগাযোগ করুন। (আপনাকে প্রথমে একটি ব্যবসা বার্তা Google অ্যাকাউন্ট দিয়ে সাইন ইন করতে হবে। একটি অ্যাকাউন্টের জন্য নিবন্ধন করতে, ব্যবসা বার্তাগুলির সাথে নিবন্ধন দেখুন।)
একটি অবস্থান যাচাই করতে, নিম্নলিখিত কমান্ডটি চালান। পূর্বশর্তগুলিতে চিহ্নিত মানগুলির সাথে ভেরিয়েবলগুলি প্রতিস্থাপন করুন।
cURL
# This code requests a verification of a location. # Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.locations/requestVerification # Replace the __BRAND_ID__ and __LOCATION_ID__ # Make sure a service account key file exists at ./service_account_key.json curl -X POST \ "https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/locations/__LOCATION_ID__:requestVerification" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/business-communications" \ -H "$(oauth2l header --json ./service_account_key.json businesscommunications)"
Node.js
/** * This code snippet requests a verification for a location. * Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.locations/requestVerification * * This code is based on the https://github.com/google-business-communications/nodejs-businesscommunications Node.js * Business Communications client library. */ /** * Edit the values below: */ const BRAND_ID = 'EDIT_HERE'; const LOCATION_ID = 'EDIT_HERE'; const PATH_TO_SERVICE_ACCOUNT_KEY = './service_account_key.json'; const businesscommunications = require('businesscommunications'); const {google} = require('googleapis'); // Initialize the Business Communications API const bcApi = new businesscommunications.businesscommunications_v1.Businesscommunications({}); // Set the scope that we need for the Business Communications API const scopes = [ 'https://www.googleapis.com/auth/businesscommunications', ]; // Set the private key to the service account file const privatekey = require(PATH_TO_SERVICE_ACCOUNT_KEY); async function main() { const authClient = await initCredentials(); const locationName = 'brands/' + BRAND_ID + '/locations/' + LOCATION_ID; if (authClient) { // Setup the parameters for the API call const apiParams = { auth: authClient, name: locationName, }; bcApi.brands.locations.requestVerification(apiParams, {}, (err, response) => { if (err !== undefined && err !== null) { console.dir(err); } else { // Agent found console.log(response.data); } }); } else { console.log('Authentication failure.'); } } /** * Initializes the Google credentials for calling the * Business Messages API. */ async function initCredentials() { // Configure a JWT auth client const authClient = new google.auth.JWT( privatekey.client_email, null, privatekey.private_key, scopes, ); return new Promise(function(resolve, reject) { // Authenticate request authClient.authorize(function(err, tokens) { if (err) { reject(false); } else { resolve(authClient); } }); }); } main();
জাভা
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; import com.google.api.client.http.HttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.businesscommunications.v1.BusinessCommunications; import com.google.api.services.businesscommunications.v1.model.Agent; import java.io.FileInputStream; import java.util.Arrays; class Main { /** * Initializes credentials used by the Business Communications API. */ private static BusinessCommunications.Builder getBusinessCommunicationsBuilder() { BusinessCommunications.Builder builder = null; try { GoogleCredential credential = GoogleCredential .fromStream(new FileInputStream("PATH_TO_SERVICE_ACCOUNT_KEY")); credential = credential.createScoped(Arrays.asList( "https://www.googleapis.com/auth/businesscommunications")); credential.refreshToken(); HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); JacksonFactory jsonFactory = JacksonFactory.getDefaultInstance(); // Create instance of the Business Communications API builder = new BusinessCommunications .Builder(httpTransport, jsonFactory, null) .setApplicationName(credential.getServiceAccountProjectId()); // Set the API credentials and endpoint builder.setHttpRequestInitializer(credential); } catch (Exception e) { e.printStackTrace(); } return builder; } public static void main(String args[]) { try { // Create client library reference BusinessCommunications.Builder builder = getBusinessCommunicationsBuilder(); String locationName = "brands/BRAND_ID/locations/LOCATION_ID/verification"; BusinessCommunications.Brands.Locations.RequestVerification request = builder.build().brands().locations().requestVerification(locationName, new RequestLocationVerificationRequest()); System.out.println(request.execute().toPrettyString()); } catch (Exception e) { e.printStackTrace(); } } }এই কোডটি জাভা বিজনেস কমিউনিকেশনস ক্লায়েন্ট লাইব্রেরির উপর ভিত্তি করে।
পাইথন
"""This code requests a verification of a location. Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.locations/requestVerification This code is based on the https://github.com/google-business-communications/python-businessmessages Python Business Messages client library. """ from oauth2client.service_account import ServiceAccountCredentials from businesscommunications.businesscommunications_v1_client import BusinesscommunicationsV1 from businesscommunications.businesscommunications_v1_messages import ( BusinesscommunicationsBrandsLocationsRequestVerificationRequest, RequestLocationVerificationRequest ) # Edit the values below: BRAND_ID = 'EDIT_HERE' LOCATION_ID = 'EDIT_HERE' SCOPES = ['https://www.googleapis.com/auth/businesscommunications'] SERVICE_ACCOUNT_FILE = './service_account_key.json' credentials = ServiceAccountCredentials.from_json_keyfile_name( SERVICE_ACCOUNT_FILE, scopes=SCOPES) client = BusinesscommunicationsV1(credentials=credentials) locations_service = BusinesscommunicationsV1.BrandsLocationsService(client) location_name = 'brands/' + BRAND_ID + '/locations/' + LOCATION_ID verification_request = locations_service.RequestVerification(BusinesscommunicationsBrandsLocationsRequestVerificationRequest( name=location_name, requestLocationVerificationRequest=RequestLocationVerificationRequest() )) print(verification_request)
বিন্যাস এবং মান বিকল্পের জন্য, brands.locations.requestVerification
দেখুন।
একটি অবস্থানের যাচাইকরণ অবস্থা পান
আপনি একটি অবস্থান যাচাইকরণের অনুরোধ করার পরে, আপনি অবস্থানের যাচাইকরণের অবস্থা পরীক্ষা করতে পারেন৷
একটি অবস্থানের যাচাইকরণের অবস্থা পেতে, নিম্নলিখিত কমান্ডটি চালান। পূর্বশর্তগুলিতে চিহ্নিত মানগুলির সাথে ভেরিয়েবলগুলি প্রতিস্থাপন করুন।
cURL
# This code gets the verification state of a location. # Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.locations/getVerification # Replace the __BRAND_ID__ and __LOCATION_ID__ # Make sure a service account key file exists at ./service_account_key.json curl -X GET \ "https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/locations/__LOCATION_ID__/verification" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/business-communications" \ -H "$(oauth2l header --json ./service_account_key.json businesscommunications)"
Node.js
/** * This code snippet gets the verification state of a location. * Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.locations/getVerification?hl=en * * This code is based on the https://github.com/google-business-communications/nodejs-businesscommunications Node.js * Business Communications client library. */ /** * Edit the values below: */ const BRAND_ID = 'EDIT_HERE'; const LOCATION_ID = 'EDIT_HERE'; const PATH_TO_SERVICE_ACCOUNT_KEY = './service_account_key.json'; const businesscommunications = require('businesscommunications'); const {google} = require('googleapis'); // Initialize the Business Communications API const bcApi = new businesscommunications.businesscommunications_v1.Businesscommunications({}); // Set the scope that we need for the Business Communications API const scopes = [ 'https://www.googleapis.com/auth/businesscommunications', ]; // Set the private key to the service account file const privatekey = require(PATH_TO_SERVICE_ACCOUNT_KEY); async function main() { const authClient = await initCredentials(); const locationName = 'brands/' + BRAND_ID + '/locations/' + LOCATION_ID; if (authClient) { // Setup the parameters for the API call const apiParams = { auth: authClient, name: locationName + '/verification', }; bcApi.brands.locations.getVerification(apiParams, {}, (err, response) => { if (err !== undefined && err !== null) { console.dir(err); } else { // Agent found console.log(response.data); } }); } else { console.log('Authentication failure.'); } } /** * Initializes the Google credentials for calling the * Business Messages API. */ async function initCredentials() { // Configure a JWT auth client const authClient = new google.auth.JWT( privatekey.client_email, null, privatekey.private_key, scopes, ); return new Promise(function(resolve, reject) { // Authenticate request authClient.authorize(function(err, tokens) { if (err) { reject(false); } else { resolve(authClient); } }); }); } main();
জাভা
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; import com.google.api.client.http.HttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.businesscommunications.v1.BusinessCommunications; import com.google.api.services.businesscommunications.v1.model.Agent; import java.io.FileInputStream; import java.util.Arrays; class Main { /** * Initializes credentials used by the Business Communications API. */ private static BusinessCommunications.Builder getBusinessCommunicationsBuilder() { BusinessCommunications.Builder builder = null; try { GoogleCredential credential = GoogleCredential .fromStream(new FileInputStream("PATH_TO_SERVICE_ACCOUNT_KEY")); credential = credential.createScoped(Arrays.asList( "https://www.googleapis.com/auth/businesscommunications")); credential.refreshToken(); HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); JacksonFactory jsonFactory = JacksonFactory.getDefaultInstance(); // Create instance of the Business Communications API builder = new BusinessCommunications .Builder(httpTransport, jsonFactory, null) .setApplicationName(credential.getServiceAccountProjectId()); // Set the API credentials and endpoint builder.setHttpRequestInitializer(credential); } catch (Exception e) { e.printStackTrace(); } return builder; } public static void main(String args[]) { try { // Create client library reference BusinessCommunications.Builder builder = getBusinessCommunicationsBuilder(); String locationName = "brands/BRAND_ID/locations/LOCATION_ID/verification"; BusinessCommunications.Brands.Locations.GetVerification request = builder.build().brands().locations().getVerification(locationName); System.out.println(request.execute().toPrettyString()); } catch (Exception e) { e.printStackTrace(); } } }এই কোডটি জাভা বিজনেস কমিউনিকেশনস ক্লায়েন্ট লাইব্রেরির উপর ভিত্তি করে।
পাইথন
"""This code gets the verification state of a location. Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.locations/getVerification This code is based on the https://github.com/google-business-communications/python-businessmessages Python Business Messages client library. """ from oauth2client.service_account import ServiceAccountCredentials from businesscommunications.businesscommunications_v1_client import BusinesscommunicationsV1 from businesscommunications.businesscommunications_v1_messages import ( BusinesscommunicationsBrandsLocationsGetVerificationRequest, ) # Edit the values below: BRAND_ID = 'EDIT_HERE' LOCATION_ID = 'EDIT_HERE' SCOPES = ['https://www.googleapis.com/auth/businesscommunications'] SERVICE_ACCOUNT_FILE = './service_account_key.json' credentials = ServiceAccountCredentials.from_json_keyfile_name( SERVICE_ACCOUNT_FILE, scopes=SCOPES) client = BusinesscommunicationsV1(credentials=credentials) locations_service = BusinesscommunicationsV1.BrandsLocationsService(client) location_name = 'brands/' + BRAND_ID + '/locations/' + LOCATION_ID + '/verification' verification_state = locations_service.GetVerification(BusinesscommunicationsBrandsLocationsGetVerificationRequest( name=location_name )) print(verification_state)
বিন্যাস এবং মান বিকল্পের জন্য, brands.locations.getVerification
দেখুন।
পরবর্তী পদক্ষেপ
একবার আপনার এজেন্ট এবং কোনো সংশ্লিষ্ট অবস্থান যাচাই হয়ে গেলে, আপনি তাদের চালু করতে প্রস্তুত যাতে তারা ব্যবহারকারীদের সাথে যোগাযোগ করতে পারে।