Help Center> Live> FAQs> API Usage> Why Is "projectId in token is nil" Returned When I Call an API?
Updated on 2023-07-07 GMT+08:00

Why Is "projectId in token is nil" Returned When I Call an API?

The possible cause is that the project used for obtaining a user token does not match the project used for calling a Live API. Live is a project-level service, which is deployed in specific physical regions.

For example, if the endpoint for obtaining the token is CN North-Beijing4, the token takes effect only in this region and can be used to authenticate the calling of Live APIs in the CN North-Beijing4 region only. In addition, the value of project_id must be cn-north-4. For details about how to obtain a project ID, see Obtaining a Project ID.

API Usage FAQs

more