-
Notifications
You must be signed in to change notification settings - Fork 1
Api access token
Fredrik Leijon edited this page Jan 14, 2020
·
8 revisions
The access_token expires after 1 hour
To obtain a token you POST to https://api.pinmeto.com/oauth/token. You need to include your
credentials in the Authorization header ("Basic " + '<<app id>>:<<app secret>>'), make sure to concatenate and then base64 encode the app_id:app_secret. Pass
grant_type="client_credentials" in the request body, for example:
POST /oauth/token HTTP/1.1
Host: https://api.pinmeto.com
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
These tokens are unique and should be stored securely.
{
token_type: 'bearer',
access_token: '3feb95961a4dfbe3277f0c55a8c73eabd29cee7e',
expires_in: 3600
}To quickly validate that your app credentials work. Run this curl row in your terminal
curl -d "grant_type=client_credentials" --user <<app_id>>:<<app_secret>> https://api.pinmeto.com/oauth/token