I’m trying to implement the phonebook API into my game. Whenever I try to call someone it comes back with a HTTP 400 error.
Call Invoke Script:
local SocialService = game:GetService(“SocialService”)
local TeleportService = game:GetService(“TeleportService”)SocialService.OnCallInviteInvoked = function()
local placeId = 14943690250
local accessCode = TeleportService:ReserveServer(placeId)return {ReservedServerAccessCode = accessCode, PlaceId = placeId}
end
PhoneBook Prompt
local plr = game.Players.LocalPlayer
local TextButton = script.Parentlocal ss = game:GetService(“SocialService”)
local function inviteFriend()
local success, result = pcall(
function()
return ss:CanSendCallInviteAsync(plr)
end
)if result == true then
ss:PromptPhoneBook(plr, “”)
game.ReplicatedStorage.Invite:FireServer(plr)
end
endTextButton.MouseButton1Click:Connect(inviteFriend)
Error (After attempting to make a call):