Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by trodd0 · Sep 28, 2018 at 04:14 AM · apisAccount Management

InvalidAPIEndpoint

I am currently trying to learn the basics of PlayFab.

To start off, I was trying to do a simple account creation with an AndroidDeviceID.

The documentation (and getting started guide) don't seem to have any specific details on how to do this. The only guide there is uses the CustomID.

I am always getting this error:

/Client/LoginWithAndroidDeviceID: InvalidAPIEndpoint

UnityEngine.Debug:LogError(Object)

PlayFabLogin:Test1(PlayFabError) (at Assets/PlayFabLogin.cs:26)

PlayFab.Internal.PlayFabUnityHttp:OnResponse(String, CallRequestContainer) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:251)

PlayFab.Internal.<Post>c__Iterator1:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:180)

UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

I am using the following code:

using System.Collections;


using System.Collections.Generic;


using UnityEngine;


using PlayFab.ClientModels;


using PlayFab;


using System;


using UnityEngine.UI;


 


public class
PlayFabLogin :
MonoBehaviour {


      
public Text textfield;


      
// Use this for initialization


      
void Start () {


            
var request = new LoginWithAndroidDeviceIDRequest {
CreateAccount = true,
AndroidDeviceId = SystemInfo.deviceUniqueIdentifier };


            
PlayFabClientAPI.LoginWithAndroidDeviceID(request, Test, Test1 );


 


      
}


 


      
void Test(LoginResult
result)


      
{


            
textfield.text = "Yes";


      
}


 


      
void Test1(PlayFabError
error)


      
{


            
textfield.text = "No" +error.GenerateErrorReport(); ;


            
Debug.LogError(error.GenerateErrorReport());


      
}


 


      



 


 


      
// Update is called once per frame


      
void Update () {


 


       }


}

Can anybody see what I am doing wrong? I apologize if this is a very simple mistake, I am a beginner, so please bear with me.

Thanks in advance!

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Sep 28, 2018 at 07:34 AM

Since the call is a login, it's not going to be the Session Ticket or Secret Key. The first thing to check is, where have you set the Title ID for your game in the project? The URL for all calls is going to begin [Title ID].playfabapi.com, so if the Title ID isn't set correctly, that could be the problem. Alternately, if this was a one-time thing, it's possible there was a momentary issue in the routing for the call (https://api.playfab.com/docs/tutorials/globalcodes).

Comment
Shivaprasad

People who like this

1 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image trodd0 · Sep 29, 2018 at 07:46 AM 0
Share

It seems that I forgot to add a TitleID in the Game Manager. So obviously there was no Title to communicate with. I added a title and it works now.

Thanks for the Tip!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    1 Person is following this question.

    avatar image

    Related Questions

    Server API for AddGenericId and GetPlayFabIDsFromGenericIDs 1 Answer

    Access Generic Account Info from Server API 1 Answer

    Can't save duplicate displayName 2 Answers

    Google account IDs don't match 1 Answer

    Searching for a user by a previous email address? 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges