Skip to content

Instantly share code, notes, and snippets.

@stephenlb
Last active March 31, 2018 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenlb/4481195 to your computer and use it in GitHub Desktop.
Save stephenlb/4481195 to your computer and use it in GitHub Desktop.
PubNub API Key Management via REST

PubNub API Key Management via REST

Step 1: Authenticate

POST https://admin.pubnub.com/api/me
email=foo@bar.com
password=password

Step 1 will return authentication details including a TOKEN and APP_ID. You will need both of these values for all following requests.

Step 2: Get Keys

GET https://admin.pubnub.com/api/apps/APP_ID_HERE/keys?token=TOKEN_HERE

Step 2 will allow you to view all keys associated with an APP.

Step 3: Create Key

POST https://admin.pubnub.com/api/keys?token=TOKEN_HERE
app_id=APP_ID_HERE

Step 3 allwos you to create new API Keys.

@kwal
Copy link

kwal commented Feb 18, 2017

Do you know if there is any documentation in relation to the 'admin' API? There is minimal mention of it in any of the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment